Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: ui/gfx/ozone/surface_factory_ozone.cc

Issue 131493005: [Ozone] Removing Stub SFO implementation & CreateTestHelper from SFO (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/ozone/surface_factory_ozone.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/ozone/surface_factory_ozone.h" 5 #include "ui/gfx/ozone/surface_factory_ozone.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "ui/gfx/vsync_provider.h" 10 #include "ui/gfx/vsync_provider.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 13
14 // static 14 // static
15 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL; 15 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL;
16 16
17 class SurfaceFactoryOzoneStub : public SurfaceFactoryOzone {
18 public:
19 SurfaceFactoryOzoneStub() {}
20 virtual ~SurfaceFactoryOzoneStub() {}
21
22 virtual HardwareState InitializeHardware() OVERRIDE { return INITIALIZED; }
23 virtual void ShutdownHardware() OVERRIDE {}
24 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE { return 0; }
25 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget(
26 gfx::AcceleratedWidget w) OVERRIDE {
27 return 0;
28 }
29 virtual bool LoadEGLGLES2Bindings(
30 AddGLLibraryCallback add_gl_library,
31 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE {
32 return true;
33 }
34 virtual bool AttemptToResizeAcceleratedWidget(
35 gfx::AcceleratedWidget w,
36 const gfx::Rect& bounds) OVERRIDE {
37 return false;
38 }
39 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider(
40 gfx::AcceleratedWidget w) OVERRIDE {
41 return scoped_ptr<VSyncProvider>();
42 }
43 };
44
45 SurfaceFactoryOzone::SurfaceFactoryOzone() { 17 SurfaceFactoryOzone::SurfaceFactoryOzone() {
46 } 18 }
47 19
48 SurfaceFactoryOzone::~SurfaceFactoryOzone() { 20 SurfaceFactoryOzone::~SurfaceFactoryOzone() {
49 } 21 }
50 22
51 SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() { 23 SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() {
52 CHECK(impl_) << "No SurfaceFactoryOzone implementation set."; 24 CHECK(impl_) << "No SurfaceFactoryOzone implementation set.";
53 return impl_; 25 return impl_;
54 } 26 }
(...skipping 23 matching lines...) Expand all
78 50
79 SkCanvas* SurfaceFactoryOzone::GetCanvasForWidget(gfx::AcceleratedWidget w) { 51 SkCanvas* SurfaceFactoryOzone::GetCanvasForWidget(gfx::AcceleratedWidget w) {
80 return NULL; 52 return NULL;
81 } 53 }
82 54
83 const int32* SurfaceFactoryOzone::GetEGLSurfaceProperties( 55 const int32* SurfaceFactoryOzone::GetEGLSurfaceProperties(
84 const int32* desired_attributes) { 56 const int32* desired_attributes) {
85 return desired_attributes; 57 return desired_attributes;
86 } 58 }
87 59
88 // static
89 SurfaceFactoryOzone* SurfaceFactoryOzone::CreateTestHelper() {
90 return new SurfaceFactoryOzoneStub;
91 }
92
93 } // namespace gfx 60 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/ozone/surface_factory_ozone.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698