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

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

Issue 102563005: [Ozone] Rename GetVSyncProvider to CreateVSyncProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win 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') | ui/gl/gl_surface_egl.h » ('j') | 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 11
11 namespace gfx { 12 namespace gfx {
12 13
13 // static 14 // static
14 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL; 15 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL;
15 16
16 class SurfaceFactoryOzoneStub : public SurfaceFactoryOzone { 17 class SurfaceFactoryOzoneStub : public SurfaceFactoryOzone {
17 public: 18 public:
18 SurfaceFactoryOzoneStub() {} 19 SurfaceFactoryOzoneStub() {}
19 virtual ~SurfaceFactoryOzoneStub() {} 20 virtual ~SurfaceFactoryOzoneStub() {}
20 21
21 virtual HardwareState InitializeHardware() OVERRIDE { return INITIALIZED; } 22 virtual HardwareState InitializeHardware() OVERRIDE { return INITIALIZED; }
22 virtual void ShutdownHardware() OVERRIDE {} 23 virtual void ShutdownHardware() OVERRIDE {}
23 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE { return 0; } 24 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE { return 0; }
24 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget( 25 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget(
25 gfx::AcceleratedWidget w) OVERRIDE { 26 gfx::AcceleratedWidget w) OVERRIDE {
26 return 0; 27 return 0;
27 } 28 }
28 virtual bool LoadEGLGLES2Bindings( 29 virtual bool LoadEGLGLES2Bindings(
29 AddGLLibraryCallback add_gl_library, 30 AddGLLibraryCallback add_gl_library,
30 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE { 31 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE {
31 return true; 32 return true;
32 } 33 }
33 virtual bool AttemptToResizeAcceleratedWidget( 34 virtual bool AttemptToResizeAcceleratedWidget(
34 gfx::AcceleratedWidget w, 35 gfx::AcceleratedWidget w,
35 const gfx::Rect& bounds) OVERRIDE { 36 const gfx::Rect& bounds) OVERRIDE {
36 return false; 37 return false;
37 } 38 }
38 virtual gfx::VSyncProvider* GetVSyncProvider( 39 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider(
39 gfx::AcceleratedWidget w) OVERRIDE { 40 gfx::AcceleratedWidget w) OVERRIDE {
40 return NULL; 41 return scoped_ptr<VSyncProvider>();
41 } 42 }
42 }; 43 };
43 44
44 SurfaceFactoryOzone::SurfaceFactoryOzone() { 45 SurfaceFactoryOzone::SurfaceFactoryOzone() {
45 } 46 }
46 47
47 SurfaceFactoryOzone::~SurfaceFactoryOzone() { 48 SurfaceFactoryOzone::~SurfaceFactoryOzone() {
48 } 49 }
49 50
50 SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() { 51 SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 const int32* desired_attributes) { 84 const int32* desired_attributes) {
84 return desired_attributes; 85 return desired_attributes;
85 } 86 }
86 87
87 // static 88 // static
88 SurfaceFactoryOzone* SurfaceFactoryOzone::CreateTestHelper() { 89 SurfaceFactoryOzone* SurfaceFactoryOzone::CreateTestHelper() {
89 return new SurfaceFactoryOzoneStub; 90 return new SurfaceFactoryOzoneStub;
90 } 91 }
91 92
92 } // namespace gfx 93 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/ozone/surface_factory_ozone.h ('k') | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698