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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 11234008: Enable texture readback support for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments 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/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index be5f845e5dd450b807dea9528f2e262cbe0789d4..4b709c6787f37a1108278e9e85d76f55e139368c 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -15,6 +15,7 @@
#include "content/browser/android/touch_point.h"
#include "content/browser/renderer_host/java/java_bound_object.h"
#include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h"
+#include "content/browser/renderer_host/compositor_impl_android.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_android.h"
@@ -443,6 +444,18 @@ void ContentViewCoreImpl::ShowPastePopup(int x, int y) {
static_cast<jint>(y));
}
+unsigned int ContentViewCoreImpl::GetScaledContentTexture(
+ const gfx::Size& size) {
+ if (!CompositorImpl::IsInitialized())
no sievers 2012/10/20 00:42:36 Can you move this check to RWHVA? Same below.
David Trainor- moved to gerrit 2012/10/22 17:56:16 Done.
+ return 0;
+
+ RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
+ if (!view)
+ return 0;
+
+ return view->GetScaledContentTexture(size);
+}
+
void ContentViewCoreImpl::StartContentIntent(const GURL& content_url) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env);
@@ -877,6 +890,19 @@ void ContentViewCoreImpl::UpdateVSyncParameters(JNIEnv* env, jobject /* obj */,
base::TimeDelta::FromMicroseconds(interval_micros));
}
+jboolean ContentViewCoreImpl::PopulateBitmapFromCompositor(JNIEnv* env,
+ jobject obj,
+ jobject jbitmap) {
+ if (!CompositorImpl::IsInitialized())
+ return false;
+
+ RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
+ if (!view)
+ return false;
+
+ return view->PopulateBitmapWithContents(jbitmap);
+}
+
void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env,
jobject obj) {
RenderViewHost* host = web_contents_->GetRenderViewHost();

Powered by Google App Engine
This is Rietveld 408576698