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

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: 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 gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 201 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
204 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( 202 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget(
205 gfx::AcceleratedWidget widget) OVERRIDE; 203 gfx::AcceleratedWidget widget) OVERRIDE;
206 virtual const int32* GetEGLSurfaceProperties( 204 virtual const int32* GetEGLSurfaceProperties(
207 const int32* desired_list) OVERRIDE; 205 const int32* desired_list) OVERRIDE;
208 virtual bool LoadEGLGLES2Bindings( 206 virtual bool LoadEGLGLES2Bindings(
209 AddGLLibraryCallback add_gl_library, 207 AddGLLibraryCallback add_gl_library,
210 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; 208 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
211 209
212 private: 210 private:
213 LibeglplatformShimLoader* eglplatform_shim_; 211 LibeglplatformShimLoader* eglplatform_shim_;
214 }; 212 };
215 213
216 SurfaceFactoryEgltest::HardwareState
217 SurfaceFactoryEgltest::InitializeHardware() {
218 return INITIALIZED;
219 }
220
221 void SurfaceFactoryEgltest::ShutdownHardware() {
222 }
223
224 intptr_t SurfaceFactoryEgltest::GetNativeDisplay() { 214 intptr_t SurfaceFactoryEgltest::GetNativeDisplay() {
225 return eglplatform_shim_->ShimGetNativeDisplay(); 215 return eglplatform_shim_->ShimGetNativeDisplay();
226 } 216 }
227 217
228 gfx::AcceleratedWidget SurfaceFactoryEgltest::GetAcceleratedWidget() { 218 gfx::AcceleratedWidget SurfaceFactoryEgltest::GetAcceleratedWidget() {
229 NOTREACHED(); 219 NOTREACHED();
230 return gfx::kNullAcceleratedWidget; 220 return gfx::kNullAcceleratedWidget;
231 } 221 }
232 222
233 scoped_ptr<SurfaceOzoneEGL> SurfaceFactoryEgltest::CreateEGLSurfaceForWidget( 223 scoped_ptr<SurfaceOzoneEGL> SurfaceFactoryEgltest::CreateEGLSurfaceForWidget(
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 385
396 } // namespace 386 } // namespace
397 387
398 OzonePlatform* CreateOzonePlatformEgltest() { 388 OzonePlatform* CreateOzonePlatformEgltest() {
399 OzonePlatformEgltest* platform = new OzonePlatformEgltest; 389 OzonePlatformEgltest* platform = new OzonePlatformEgltest;
400 platform->Initialize(); 390 platform->Initialize();
401 return platform; 391 return platform;
402 } 392 }
403 393
404 } // namespace ui 394 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698