Index: ui/gl/gl_image_android.cc |
diff --git a/ui/gl/gl_image_android.cc b/ui/gl/gl_image_android.cc |
index fe871e7b5e3b9235503f71b4ed2034ad344472db..328b0d61fdf34fbcba30d0af02122f5b1d9a479a 100644 |
--- a/ui/gl/gl_image_android.cc |
+++ b/ui/gl/gl_image_android.cc |
@@ -5,6 +5,7 @@ |
#include "ui/gl/gl_image.h" |
#include "base/debug/trace_event.h" |
+#include "ui/gl/android/gl_image_stream.h" |
#include "ui/gl/gl_image_egl.h" |
#include "ui/gl/gl_image_shm.h" |
#include "ui/gl/gl_image_stub.h" |
@@ -57,4 +58,17 @@ scoped_refptr<GLImage> GLImage::CreateGLImageForGpuMemoryBuffer( |
} |
} |
+scoped_refptr<GLImage> GLImage::CreateGLImageForStreamTexture() { |
+ TRACE_EVENT0("gpu", "GLImage::CreateGLImageForStreamTexture"); |
+ switch (GetGLImplementation()) { |
+ case kGLImplementationEGLGLES2: |
+ return new GLImageStream(); |
+ case kGLImplementationMockGL: |
+ return new GLImageStub; |
+ default: |
+ NOTREACHED(); |
+ return NULL; |
+ } |
+} |
+ |
} // namespace gfx |