OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/gl/gl_surface.h" |
| 6 |
| 7 #include "third_party/khronos/EGL/egl.h" |
| 8 #include "ui/gl/gl_implementation.h" |
| 9 #include "ui/gl/gl_surface_stub.h" |
| 10 |
| 11 namespace gfx { |
| 12 |
| 13 bool GLSurface::InitializeOneOffInternal() { |
| 14 return false; |
| 15 } |
| 16 |
| 17 scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( |
| 18 gfx::AcceleratedWidget window) { |
| 19 switch (GetGLImplementation()) { |
| 20 case kGLImplementationMockGL: |
| 21 return new GLSurfaceStub; |
| 22 default: |
| 23 return NULL; |
| 24 } |
| 25 } |
| 26 |
| 27 scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( |
| 28 const gfx::Size& size) { |
| 29 switch (GetGLImplementation()) { |
| 30 case kGLImplementationMockGL: |
| 31 return new GLSurfaceStub; |
| 32 default: |
| 33 return NULL; |
| 34 } |
| 35 } |
| 36 |
| 37 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
| 38 return EGL_DEFAULT_DISPLAY; |
| 39 } |
| 40 |
| 41 } // namespace gfx |
OLD | NEW |