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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 11234008: Enable texture readback support for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to remove local GLHelper from a method Created 8 years, 2 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: content/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 4a4f891b67abd8e128184e80e6e14aeff0a324c6..72a96ed09d8889c52584002f0924afcf732b8920 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -13,6 +13,7 @@
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
#include "content/browser/renderer_host/image_transport_factory_android.h"
+#include "content/common/gpu/client/gl_helper.h"
#include "content/common/gpu/client/gpu_channel_host.h"
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
@@ -233,6 +234,14 @@ void CompositorImpl::DeleteTexture(WebKit::WebGLId texture_id) {
DCHECK(context->getError() == GL_NO_ERROR);
}
+void CompositorImpl::CopyTextureToBitmap(WebKit::WebGLId texture_id,
+ gfx::JavaBitmap& bitmap) {
+ GLHelper* helper = ImageTransportFactoryAndroid::GetInstance()->GetGLHelper();
+ helper->SyncCopyRawTextureTo(texture_id,
+ bitmap.size(),
+ (unsigned char*) bitmap.pixels());
piman 2012/10/19 22:10:10 nit: static_cast or reinterpret_cast as appropriat
David Trainor- moved to gerrit 2012/10/19 23:11:27 Done.
+}
+
void CompositorImpl::updateAnimations(double frameBeginTime) {
}

Powered by Google App Engine
This is Rietveld 408576698