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

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: Rebased 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 e44a2a793a63720443e5968b038cc07f834e6312..20a6474c89c2a0b7600008abacb4566b5b3ca77b 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"
@@ -235,6 +236,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->ReadbackTextureSync(texture_id,
+ bitmap.size(),
+ static_cast<unsigned char*> (bitmap.pixels()));
+}
+
void CompositorImpl::updateAnimations(double frameBeginTime) {
}

Powered by Google App Engine
This is Rietveld 408576698