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

Side by Side Diff: ui/gl/gl_surface_ozone.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/gl/gl_surface.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/gl/gl_implementation.h" 10 #include "ui/gl/gl_implementation.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 DISALLOW_COPY_AND_ASSIGN(GLSurfaceOzoneEGL); 49 DISALLOW_COPY_AND_ASSIGN(GLSurfaceOzoneEGL);
50 }; 50 };
51 51
52 } // namespace 52 } // namespace
53 53
54 // static 54 // static
55 bool GLSurface::InitializeOneOffInternal() { 55 bool GLSurface::InitializeOneOffInternal() {
56 switch (GetGLImplementation()) { 56 switch (GetGLImplementation()) {
57 case kGLImplementationEGLGLES2: 57 case kGLImplementationEGLGLES2:
58 if (ui::SurfaceFactoryOzone::GetInstance()->InitializeHardware() !=
59 ui::SurfaceFactoryOzone::INITIALIZED) {
60 LOG(ERROR) << "Ozone failed to initialize hardware";
61 return false;
62 }
63
64 if (!GLSurfaceEGL::InitializeOneOff()) { 58 if (!GLSurfaceEGL::InitializeOneOff()) {
65 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; 59 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
66 return false; 60 return false;
67 } 61 }
68 62
69 return true; 63 return true;
70 case kGLImplementationOSMesaGL: 64 case kGLImplementationOSMesaGL:
71 case kGLImplementationMockGL: 65 case kGLImplementationMockGL:
72 return true; 66 return true;
73 default: 67 default:
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 NOTREACHED(); 128 NOTREACHED();
135 return NULL; 129 return NULL;
136 } 130 }
137 } 131 }
138 132
139 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { 133 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
140 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay(); 134 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay();
141 } 135 }
142 136
143 } // namespace gfx 137 } // namespace gfx
OLDNEW
« no previous file with comments | « content/browser/compositor/software_output_device_ozone_unittest.cc ('k') | ui/ozone/platform/caca/caca_window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698