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/gfx/ozone/surface_factory_ozone.h"
9 #include "base/command_line.h"
10 #include "ui/gfx/ozone/surface_ozone_canvas.h"
11 #include "ui/gfx/ozone/surface_ozone_egl.h"
16 SurfaceFactoryOzone
* SurfaceFactoryOzone::impl_
= NULL
;
18 SurfaceFactoryOzone::SurfaceFactoryOzone() {
21 SurfaceFactoryOzone::~SurfaceFactoryOzone() {
24 SurfaceFactoryOzone
* SurfaceFactoryOzone::GetInstance() {
25 CHECK(impl_
) << "No SurfaceFactoryOzone implementation set.";
29 void SurfaceFactoryOzone::SetInstance(SurfaceFactoryOzone
* impl
) {
33 intptr_t SurfaceFactoryOzone::GetNativeDisplay() {
37 scoped_ptr
<SurfaceOzoneEGL
> SurfaceFactoryOzone::CreateEGLSurfaceForWidget(
38 gfx::AcceleratedWidget widget
) {
40 return scoped_ptr
<SurfaceOzoneEGL
>();
43 scoped_ptr
<SurfaceOzoneCanvas
> SurfaceFactoryOzone::CreateCanvasForWidget(
44 gfx::AcceleratedWidget widget
) {
46 return scoped_ptr
<SurfaceOzoneCanvas
>();
49 const int32
* SurfaceFactoryOzone::GetEGLSurfaceProperties(
50 const int32
* desired_attributes
) {
51 return desired_attributes
;
55 gfx::OverlayCandidatesOzone
* SurfaceFactoryOzone::GetOverlayCandidates(
56 gfx::AcceleratedWidget w
) {
60 void SurfaceFactoryOzone::ScheduleOverlayPlane(
61 gfx::AcceleratedWidget w
,
63 gfx::OverlayTransform plane_transform
,
64 gfx::NativeBufferOzone buffer
,
65 const gfx::Rect
& display_bounds
,
66 gfx::RectF crop_rect
) {
70 gfx::NativeBufferOzone
SurfaceFactoryOzone::CreateNativeBuffer(
72 BufferFormat format
) {