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

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

Issue 399953003: ozone: Remove InitializeHardware / ShutdownHardware (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests more Created 6 years, 5 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 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // This finds the right EGL/GLES2 libraries for loading, and creates 190 // This finds the right EGL/GLES2 libraries for loading, and creates
191 // a single native window via ShimCreateWindow for drawing 191 // a single native window via ShimCreateWindow for drawing
192 // into. 192 // into.
193 class SurfaceFactoryEgltest : public ui::SurfaceFactoryOzone { 193 class SurfaceFactoryEgltest : public ui::SurfaceFactoryOzone {
194 public: 194 public:
195 SurfaceFactoryEgltest(LibeglplatformShimLoader* eglplatform_shim) 195 SurfaceFactoryEgltest(LibeglplatformShimLoader* eglplatform_shim)
196 : eglplatform_shim_(eglplatform_shim) {} 196 : eglplatform_shim_(eglplatform_shim) {}
197 virtual ~SurfaceFactoryEgltest() {} 197 virtual ~SurfaceFactoryEgltest() {}
198 198
199 // SurfaceFactoryOzone: 199 // SurfaceFactoryOzone:
200 virtual HardwareState InitializeHardware() OVERRIDE;
201 virtual void ShutdownHardware() OVERRIDE;
202 virtual intptr_t GetNativeDisplay() OVERRIDE; 200 virtual intptr_t GetNativeDisplay() OVERRIDE;
203 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( 201 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget(
204 gfx::AcceleratedWidget widget) OVERRIDE; 202 gfx::AcceleratedWidget widget) OVERRIDE;
205 virtual const int32* GetEGLSurfaceProperties( 203 virtual const int32* GetEGLSurfaceProperties(
206 const int32* desired_list) OVERRIDE; 204 const int32* desired_list) OVERRIDE;
207 virtual bool LoadEGLGLES2Bindings( 205 virtual bool LoadEGLGLES2Bindings(
208 AddGLLibraryCallback add_gl_library, 206 AddGLLibraryCallback add_gl_library,
209 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; 207 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
210 208
211 private: 209 private:
212 LibeglplatformShimLoader* eglplatform_shim_; 210 LibeglplatformShimLoader* eglplatform_shim_;
213 }; 211 };
214 212
215 SurfaceFactoryEgltest::HardwareState
216 SurfaceFactoryEgltest::InitializeHardware() {
217 return INITIALIZED;
218 }
219
220 void SurfaceFactoryEgltest::ShutdownHardware() {
221 }
222
223 intptr_t SurfaceFactoryEgltest::GetNativeDisplay() { 213 intptr_t SurfaceFactoryEgltest::GetNativeDisplay() {
224 return eglplatform_shim_->ShimGetNativeDisplay(); 214 return eglplatform_shim_->ShimGetNativeDisplay();
225 } 215 }
226 216
227 scoped_ptr<SurfaceOzoneEGL> SurfaceFactoryEgltest::CreateEGLSurfaceForWidget( 217 scoped_ptr<SurfaceOzoneEGL> SurfaceFactoryEgltest::CreateEGLSurfaceForWidget(
228 gfx::AcceleratedWidget widget) { 218 gfx::AcceleratedWidget widget) {
229 return make_scoped_ptr<SurfaceOzoneEGL>( 219 return make_scoped_ptr<SurfaceOzoneEGL>(
230 new SurfaceOzoneEgltest(widget, eglplatform_shim_)); 220 new SurfaceOzoneEgltest(widget, eglplatform_shim_));
231 } 221 }
232 222
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 379
390 } // namespace 380 } // namespace
391 381
392 OzonePlatform* CreateOzonePlatformEgltest() { 382 OzonePlatform* CreateOzonePlatformEgltest() {
393 OzonePlatformEgltest* platform = new OzonePlatformEgltest; 383 OzonePlatformEgltest* platform = new OzonePlatformEgltest;
394 platform->Initialize(); 384 platform->Initialize();
395 return platform; 385 return platform;
396 } 386 }
397 387
398 } // namespace ui 388 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_gbm.cc ('k') | ui/ozone/platform/test/test_window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698