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

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

Issue 23438002: Adding functionality to paint and signal buffer swap for ozone surface factory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address missing AcceleratedWidget and pure virtual comments Created 7 years, 3 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
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/base/ozone/surface_factory_ozone.h" 5 #include "ui/base/ozone/surface_factory_ozone.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 namespace ui { 9 namespace ui {
10 10
11 // static 11 // static
12 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL; 12 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL;
13 13
14 class SurfaceFactoryOzoneStub : public SurfaceFactoryOzone { 14 class SurfaceFactoryOzoneStub : public SurfaceFactoryOzone {
15 public: 15 public:
16 SurfaceFactoryOzoneStub() {} 16 SurfaceFactoryOzoneStub() {}
17 virtual ~SurfaceFactoryOzoneStub() {} 17 virtual ~SurfaceFactoryOzoneStub() {}
18 18
19 virtual void InitializeHardware() OVERRIDE {} 19 virtual bool InitializeHardware() OVERRIDE { return true; }
20 virtual void ShutdownHardware() OVERRIDE {} 20 virtual void ShutdownHardware() OVERRIDE {}
21 virtual void* GetNativeDisplay() OVERRIDE { return 0; }
rjkroege 2013/08/27 16:03:42 this is also unnecessary.
dnicoara 2013/08/28 14:58:03 Done.
21 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE { return 0; } 22 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE { return 0; }
22 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget( 23 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget(
23 gfx::AcceleratedWidget w) OVERRIDE { 24 gfx::AcceleratedWidget w) OVERRIDE {
24 return 0; 25 return 0;
25 } 26 }
26 virtual bool LoadEGLGLES2Bindings() OVERRIDE { return true; } 27 virtual bool LoadEGLGLES2Bindings() OVERRIDE { return true; }
27 virtual bool AttemptToResizeAcceleratedWidget( 28 virtual bool AttemptToResizeAcceleratedWidget(
28 gfx::AcceleratedWidget w, 29 gfx::AcceleratedWidget w,
29 const gfx::Rect& bounds) OVERRIDE { 30 const gfx::Rect& bounds) OVERRIDE {
30 return false; 31 return false;
31 } 32 }
33 virtual bool SwapBuffers(gfx::AcceleratedWidget w) OVERRIDE { return true; }
rjkroege 2013/08/27 16:03:42 this is unnecessary.
dnicoara 2013/08/28 14:58:03 Done.
32 virtual gfx::VSyncProvider* GetVSyncProvider( 34 virtual gfx::VSyncProvider* GetVSyncProvider(
33 gfx::AcceleratedWidget w) OVERRIDE { 35 gfx::AcceleratedWidget w) OVERRIDE {
34 return NULL; 36 return NULL;
35 } 37 }
36 }; 38 };
37 39
38 SurfaceFactoryOzone::SurfaceFactoryOzone() { 40 SurfaceFactoryOzone::SurfaceFactoryOzone() {
39 } 41 }
40 42
41 SurfaceFactoryOzone::~SurfaceFactoryOzone() { 43 SurfaceFactoryOzone::~SurfaceFactoryOzone() {
(...skipping 12 matching lines...) Expand all
54 char* envvar = getenv("ASH_DISPLAY_SPEC"); 56 char* envvar = getenv("ASH_DISPLAY_SPEC");
55 if (envvar) 57 if (envvar)
56 return envvar; 58 return envvar;
57 return "720x1280*2"; 59 return "720x1280*2";
58 } 60 }
59 61
60 gfx::Screen* SurfaceFactoryOzone::CreateDesktopScreen() { 62 gfx::Screen* SurfaceFactoryOzone::CreateDesktopScreen() {
61 return NULL; 63 return NULL;
62 } 64 }
63 65
66 void* SurfaceFactoryOzone::GetNativeDisplay() {
67 return NULL;
68 }
69
70 bool SurfaceFactoryOzone::SwapBuffers(gfx::AcceleratedWidget) {
71 return true;
72 }
73
64 // static 74 // static
65 SurfaceFactoryOzone* SurfaceFactoryOzone::CreateTestHelper() { 75 SurfaceFactoryOzone* SurfaceFactoryOzone::CreateTestHelper() {
66 return new SurfaceFactoryOzoneStub; 76 return new SurfaceFactoryOzoneStub;
67 } 77 }
68 78
69 } // namespace ui 79 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698