| Index: ui/gl/gl_image_android.cc
|
| diff --git a/ui/gl/gl_image_android.cc b/ui/gl/gl_image_android.cc
|
| index e55e3bbd6890e3078d8003c94940114fbbdcc724..eea41fb3246094275f056a55ade81ead944485bc 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/gl_image_egl.h"
|
| #include "ui/gl/gl_image_stub.h"
|
| #include "ui/gl/gl_implementation.h"
|
|
|
| @@ -24,4 +25,23 @@ scoped_refptr<GLImage> GLImage::CreateGLImage(gfx::PluginWindowHandle window) {
|
| }
|
| }
|
|
|
| +scoped_refptr<GLImage> GLImage::CreateGLImageForPixelBuffer(
|
| + gfx::PixelBufferHandle buffer, const gfx::Size& size) {
|
| + TRACE_EVENT0("gpu", "GLImage::CreateGLImageForPixelBuffer");
|
| + switch (GetGLImplementation()) {
|
| + case kGLImplementationEGLGLES2: {
|
| + scoped_refptr<GLImageEGL> image(new GLImageEGL(size));
|
| + if (!image->Initialize(buffer))
|
| + return NULL;
|
| +
|
| + return image;
|
| + }
|
| + case kGLImplementationMockGL:
|
| + return new GLImageStub;
|
| + default:
|
| + NOTREACHED();
|
| + return NULL;
|
| + }
|
| +}
|
| +
|
| } // namespace gfx
|
|
|