Remove unused parameter.
[chromium-blink-merge.git] / ui / ozone / public / surface_factory_ozone.cc
blob1c57038d32452d9eecc4bea34178b9b65e8265af
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/ozone/public/surface_factory_ozone.h"
7 #include <stdlib.h>
9 #include "base/command_line.h"
10 #include "ui/ozone/public/native_pixmap.h"
11 #include "ui/ozone/public/surface_ozone_canvas.h"
12 #include "ui/ozone/public/surface_ozone_egl.h"
14 namespace ui {
16 // static
17 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL;
19 SurfaceFactoryOzone::SurfaceFactoryOzone() {
20 DCHECK(!impl_) << "There should only be a single SurfaceFactoryOzone.";
21 impl_ = this;
24 SurfaceFactoryOzone::~SurfaceFactoryOzone() {
25 DCHECK_EQ(impl_, this);
26 impl_ = NULL;
29 SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() {
30 DCHECK(impl_) << "No SurfaceFactoryOzone implementation set.";
31 return impl_;
34 intptr_t SurfaceFactoryOzone::GetNativeDisplay() {
35 return 0;
38 int SurfaceFactoryOzone::GetDrmFd() {
39 return -1;
42 scoped_ptr<SurfaceOzoneEGL> SurfaceFactoryOzone::CreateEGLSurfaceForWidget(
43 gfx::AcceleratedWidget widget) {
44 NOTIMPLEMENTED();
45 return nullptr;
48 scoped_ptr<SurfaceOzoneEGL>
49 SurfaceFactoryOzone::CreateSurfacelessEGLSurfaceForWidget(
50 gfx::AcceleratedWidget widget) {
51 NOTIMPLEMENTED();
52 return nullptr;
55 scoped_ptr<SurfaceOzoneCanvas> SurfaceFactoryOzone::CreateCanvasForWidget(
56 gfx::AcceleratedWidget widget) {
57 NOTIMPLEMENTED();
58 return nullptr;
61 const int32* SurfaceFactoryOzone::GetEGLSurfaceProperties(
62 const int32* desired_attributes) {
63 return desired_attributes;
66 ui::OverlayCandidatesOzone* SurfaceFactoryOzone::GetOverlayCandidates(
67 gfx::AcceleratedWidget w) {
68 return NULL;
71 scoped_refptr<ui::NativePixmap> SurfaceFactoryOzone::CreateNativePixmap(
72 gfx::AcceleratedWidget widget,
73 gfx::Size size,
74 BufferFormat format,
75 BufferUsage usage) {
76 return NULL;
79 bool SurfaceFactoryOzone::ScheduleOverlayPlane(
80 gfx::AcceleratedWidget widget,
81 int plane_z_order,
82 gfx::OverlayTransform plane_transform,
83 scoped_refptr<NativePixmap> buffer,
84 const gfx::Rect& display_bounds,
85 const gfx::RectF& crop_rect) {
86 return false;
89 bool SurfaceFactoryOzone::CanShowPrimaryPlaneAsOverlay() {
90 return false;
93 bool SurfaceFactoryOzone::CanCreateNativePixmap(BufferUsage usage) {
94 return false;
97 } // namespace ui