Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / ozone / public / surface_factory_ozone.cc
blob3780bc827a0223279c8fbf179193fba851809bdd
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 scoped_ptr<SurfaceOzoneEGL> SurfaceFactoryOzone::CreateEGLSurfaceForWidget(
39 gfx::AcceleratedWidget widget) {
40 NOTIMPLEMENTED();
41 return nullptr;
44 scoped_ptr<SurfaceOzoneEGL>
45 SurfaceFactoryOzone::CreateSurfacelessEGLSurfaceForWidget(
46 gfx::AcceleratedWidget widget) {
47 NOTIMPLEMENTED();
48 return nullptr;
51 scoped_ptr<SurfaceOzoneCanvas> SurfaceFactoryOzone::CreateCanvasForWidget(
52 gfx::AcceleratedWidget widget) {
53 NOTIMPLEMENTED();
54 return nullptr;
57 const int32* SurfaceFactoryOzone::GetEGLSurfaceProperties(
58 const int32* desired_attributes) {
59 return desired_attributes;
62 ui::OverlayCandidatesOzone* SurfaceFactoryOzone::GetOverlayCandidates(
63 gfx::AcceleratedWidget w) {
64 return NULL;
67 scoped_refptr<ui::NativePixmap> SurfaceFactoryOzone::CreateNativePixmap(
68 gfx::AcceleratedWidget widget,
69 gfx::Size size,
70 BufferFormat format,
71 BufferUsage usage) {
72 return NULL;
75 bool SurfaceFactoryOzone::ScheduleOverlayPlane(
76 gfx::AcceleratedWidget widget,
77 int plane_z_order,
78 gfx::OverlayTransform plane_transform,
79 scoped_refptr<NativePixmap> buffer,
80 const gfx::Rect& display_bounds,
81 const gfx::RectF& crop_rect) {
82 return false;
85 bool SurfaceFactoryOzone::CanShowPrimaryPlaneAsOverlay() {
86 return false;
89 bool SurfaceFactoryOzone::CanCreateNativePixmap(BufferUsage usage) {
90 return false;
93 } // namespace ui