Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Unified Diff: ui/gl/gl_image_android.cc

Issue 177953004: Enable SurfaceTexture based zero-copy texture uploading on Android platform Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gl/gl_image_android.cc
diff --git a/ui/gl/gl_image_android.cc b/ui/gl/gl_image_android.cc
index e56dc2d074be63a8f961fa24c958c44963c46c7f..126cf65a7920dc2c0ffbfb1536cc7c90fa385a71 100644
--- a/ui/gl/gl_image_android.cc
+++ b/ui/gl/gl_image_android.cc
@@ -8,6 +8,7 @@
#include "ui/gl/gl_image_egl.h"
#include "ui/gl/gl_image_shm.h"
#include "ui/gl/gl_image_stub.h"
+#include "ui/gl/gl_image_surface_texture.h"
#include "ui/gl/gl_implementation.h"
namespace gfx {
@@ -48,6 +49,14 @@ scoped_refptr<GLImage> GLImage::CreateGLImageForGpuMemoryBuffer(
return image;
}
+ case SURFACE_TEXTURE_BUFFER: {
+ scoped_refptr<GLImageSurfaceTexture> image(
+ new GLImageSurfaceTexture(size));
+ if (!image->Initialize(buffer))
+ return NULL;
+
+ return image;
+ }
default:
NOTREACHED();
return NULL;
« ui/gfx/gpu_memory_buffer.h ('K') | « ui/gl/gl.gyp ('k') | ui/gl/gl_image_surface_texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698