| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 timing_info.rateRefresh.uiNumerator); | 76 timing_info.rateRefresh.uiNumerator); |
| 77 callback.Run(timebase, interval); | 77 callback.Run(timebase, interval); |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 DISALLOW_COPY_AND_ASSIGN(DWMVSyncProvider); | 82 DISALLOW_COPY_AND_ASSIGN(DWMVSyncProvider); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 // Helper routine that does one-off initialization like determining the | 85 // Helper routine that does one-off initialization like determining the |
| 86 // pixel format and initializing the GL bindings. | 86 // pixel format. |
| 87 bool GLSurface::InitializeOneOffInternal() { | 87 bool GLSurface::InitializeOneOffInternal() { |
| 88 switch (GetGLImplementation()) { | 88 switch (GetGLImplementation()) { |
| 89 case kGLImplementationDesktopGL: | 89 case kGLImplementationDesktopGL: |
| 90 if (!GLSurfaceWGL::InitializeOneOff()) { | 90 if (!GLSurfaceWGL::InitializeOneOff()) { |
| 91 LOG(ERROR) << "GLSurfaceWGL::InitializeOneOff failed."; | 91 LOG(ERROR) << "GLSurfaceWGL::InitializeOneOff failed."; |
| 92 return false; | 92 return false; |
| 93 } | 93 } |
| 94 break; | 94 break; |
| 95 case kGLImplementationEGLGLES2: | 95 case kGLImplementationEGLGLES2: |
| 96 if (!GLSurfaceEGL::InitializeOneOff()) { | 96 if (!GLSurfaceEGL::InitializeOneOff()) { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 282 } |
| 283 case kGLImplementationMockGL: | 283 case kGLImplementationMockGL: |
| 284 return new GLSurfaceStub; | 284 return new GLSurfaceStub; |
| 285 default: | 285 default: |
| 286 NOTREACHED(); | 286 NOTREACHED(); |
| 287 return NULL; | 287 return NULL; |
| 288 } | 288 } |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace gfx | 291 } // namespace gfx |
| OLD | NEW |