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

Side by Side Diff: ui/ozone/platform/egltest/ozone_platform_egltest.cc

Issue 275263002: [wip] ozonex: X11 backend for ozone. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 6 years, 6 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/ozone/platform/dri/dri_surface_factory.cc ('k') | ui/ozone/platform/ozonex/DEPS » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ozone/platform/egltest/ozone_platform_egltest.h" 5 #include "ui/ozone/platform/egltest/ozone_platform_egltest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual ~SurfaceFactoryEgltest() { DestroySingleWindow(); } 86 virtual ~SurfaceFactoryEgltest() { DestroySingleWindow(); }
87 87
88 // Create the window. 88 // Create the window.
89 bool CreateSingleWindow(); 89 bool CreateSingleWindow();
90 void DestroySingleWindow(); 90 void DestroySingleWindow();
91 91
92 // SurfaceFactoryOzone: 92 // SurfaceFactoryOzone:
93 virtual HardwareState InitializeHardware() OVERRIDE; 93 virtual HardwareState InitializeHardware() OVERRIDE;
94 virtual void ShutdownHardware() OVERRIDE; 94 virtual void ShutdownHardware() OVERRIDE;
95 virtual intptr_t GetNativeDisplay() OVERRIDE; 95 virtual intptr_t GetNativeDisplay() OVERRIDE;
96 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 96 virtual intptr_t CreatePlatformWindow(ui::PlatformWindowDelegate*) OVERRIDE;
97 virtual scoped_ptr<gfx::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( 97 virtual scoped_ptr<gfx::SurfaceOzoneEGL> CreateEGLSurfaceForWidget(
98 gfx::AcceleratedWidget widget) OVERRIDE; 98 gfx::AcceleratedWidget widget) OVERRIDE;
99 virtual const int32* GetEGLSurfaceProperties( 99 virtual const int32* GetEGLSurfaceProperties(
100 const int32* desired_list) OVERRIDE; 100 const int32* desired_list) OVERRIDE;
101 virtual bool LoadEGLGLES2Bindings( 101 virtual bool LoadEGLGLES2Bindings(
102 AddGLLibraryCallback add_gl_library, 102 AddGLLibraryCallback add_gl_library,
103 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; 103 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
104 104
105 private: 105 private:
106 LibeglplatformShimLoader* eglplatform_shim_; 106 LibeglplatformShimLoader* eglplatform_shim_;
(...skipping 17 matching lines...) Expand all
124 return INITIALIZED; 124 return INITIALIZED;
125 } 125 }
126 126
127 void SurfaceFactoryEgltest::ShutdownHardware() { 127 void SurfaceFactoryEgltest::ShutdownHardware() {
128 } 128 }
129 129
130 intptr_t SurfaceFactoryEgltest::GetNativeDisplay() { 130 intptr_t SurfaceFactoryEgltest::GetNativeDisplay() {
131 return eglplatform_shim_->ShimGetNativeDisplay(); 131 return eglplatform_shim_->ShimGetNativeDisplay();
132 } 132 }
133 133
134 gfx::AcceleratedWidget SurfaceFactoryEgltest::GetAcceleratedWidget() { 134 intptr_t SurfaceFactoryEgltest::CreatePlatformWindow(
135 ui::PlatformWindowDelegate* delegate) {
135 if (window_id_ == SHIM_NO_WINDOW_ID && !CreateSingleWindow()) 136 if (window_id_ == SHIM_NO_WINDOW_ID && !CreateSingleWindow())
136 LOG(FATAL) << "failed to create window"; 137 LOG(FATAL) << "failed to create window";
137 return window_id_; 138 return window_id_;
138 } 139 }
139 140
140 scoped_ptr<gfx::SurfaceOzoneEGL> 141 scoped_ptr<gfx::SurfaceOzoneEGL>
141 SurfaceFactoryEgltest::CreateEGLSurfaceForWidget( 142 SurfaceFactoryEgltest::CreateEGLSurfaceForWidget(
142 gfx::AcceleratedWidget widget) { 143 gfx::AcceleratedWidget widget) {
143 return make_scoped_ptr<gfx::SurfaceOzoneEGL>( 144 return make_scoped_ptr<gfx::SurfaceOzoneEGL>(
144 new SurfaceOzoneEgltest(widget, eglplatform_shim_)); 145 new SurfaceOzoneEgltest(widget, eglplatform_shim_));
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 279
279 } // namespace 280 } // namespace
280 281
281 OzonePlatform* CreateOzonePlatformEgltest() { 282 OzonePlatform* CreateOzonePlatformEgltest() {
282 OzonePlatformEgltest* platform = new OzonePlatformEgltest; 283 OzonePlatformEgltest* platform = new OzonePlatformEgltest;
283 platform->Initialize(); 284 platform->Initialize();
284 return platform; 285 return platform;
285 } 286 }
286 287
287 } // namespace ui 288 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_factory.cc ('k') | ui/ozone/platform/ozonex/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698