Index: chromecast/ui/gl/gl_surface_cast.cc |
diff --git a/chromecast/ui/gl/gl_surface_cast.cc b/chromecast/ui/gl/gl_surface_cast.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ff78d383ca1e4a7c31ab5ff18e24958a98507a89 |
--- /dev/null |
+++ b/chromecast/ui/gl/gl_surface_cast.cc |
@@ -0,0 +1,41 @@ |
+// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/gl/gl_surface.h" |
+ |
+#include "third_party/khronos/EGL/egl.h" |
+#include "ui/gl/gl_implementation.h" |
+#include "ui/gl/gl_surface_stub.h" |
+ |
+namespace gfx { |
+ |
+bool GLSurface::InitializeOneOffInternal() { |
+ return false; |
+} |
+ |
+scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( |
+ gfx::AcceleratedWidget window) { |
+ switch (GetGLImplementation()) { |
+ case kGLImplementationMockGL: |
+ return new GLSurfaceStub; |
+ default: |
+ return NULL; |
+ } |
+} |
+ |
+scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( |
+ const gfx::Size& size) { |
+ switch (GetGLImplementation()) { |
+ case kGLImplementationMockGL: |
+ return new GLSurfaceStub; |
+ default: |
+ return NULL; |
+ } |
+} |
+ |
+EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
+ return EGL_DEFAULT_DISPLAY; |
+} |
+ |
+} // namespace gfx |