blob: c4efc06111748619fa2e2540c955fc580ef431fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/ozone/public/surface_factory_ozone.h"
#include <stdlib.h>
#include "base/command_line.h"
#include "ui/ozone/public/native_pixmap.h"
#include "ui/ozone/public/surface_ozone_canvas.h"
#include "ui/ozone/public/surface_ozone_egl.h"
namespace ui {
// static
SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL;
SurfaceFactoryOzone::SurfaceFactoryOzone() {
DCHECK(!impl_) << "There should only be a single SurfaceFactoryOzone.";
impl_ = this;
}
SurfaceFactoryOzone::~SurfaceFactoryOzone() {
DCHECK_EQ(impl_, this);
impl_ = NULL;
}
SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() {
DCHECK(impl_) << "No SurfaceFactoryOzone implementation set.";
return impl_;
}
intptr_t SurfaceFactoryOzone::GetNativeDisplay() {
return 0;
}
scoped_ptr<SurfaceOzoneEGL> SurfaceFactoryOzone::CreateEGLSurfaceForWidget(
gfx::AcceleratedWidget widget) {
NOTIMPLEMENTED();
return nullptr;
}
scoped_ptr<SurfaceOzoneEGL>
SurfaceFactoryOzone::CreateSurfacelessEGLSurfaceForWidget(
gfx::AcceleratedWidget widget) {
NOTIMPLEMENTED();
return nullptr;
}
scoped_ptr<SurfaceOzoneCanvas> SurfaceFactoryOzone::CreateCanvasForWidget(
gfx::AcceleratedWidget widget) {
NOTIMPLEMENTED();
return nullptr;
}
const int32* SurfaceFactoryOzone::GetEGLSurfaceProperties(
const int32* desired_attributes) {
return desired_attributes;
}
scoped_refptr<ui::NativePixmap> SurfaceFactoryOzone::CreateNativePixmap(
gfx::AcceleratedWidget widget,
gfx::Size size,
BufferFormat format,
BufferUsage usage) {
return NULL;
}
bool SurfaceFactoryOzone::ScheduleOverlayPlane(
gfx::AcceleratedWidget widget,
int plane_z_order,
gfx::OverlayTransform plane_transform,
scoped_refptr<NativePixmap> buffer,
const gfx::Rect& display_bounds,
const gfx::RectF& crop_rect) {
return false;
}
bool SurfaceFactoryOzone::CanShowPrimaryPlaneAsOverlay() {
return false;
}
bool SurfaceFactoryOzone::CanCreateNativePixmap(BufferUsage usage) {
return false;
}
} // namespace ui
|