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

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

Issue 173023005: Adds support for capturing a sub rect of the compositing surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to reland 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: 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 357d2a9b585851b3f9fff9c2c1a894d59d3e1824..ecc627f95b4903fc4f5c799a51c5fe5b5769640d 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -699,6 +699,7 @@ void ContentViewCoreImpl::ShowPastePopup(int x_dip, int y_dip) {
void ContentViewCoreImpl::GetScaledContentBitmap(
float scale,
jobject jbitmap_config,
+ gfx::Rect src_subrect,
const base::Callback<void(bool, const SkBitmap&)>& result_callback) {
RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
if (!view) {
@@ -706,7 +707,8 @@ void ContentViewCoreImpl::GetScaledContentBitmap(
return;
}
SkBitmap::Config skbitmap_format = gfx::ConvertToSkiaConfig(jbitmap_config);
- view->GetScaledContentBitmap(scale, skbitmap_format, result_callback);
+ view->GetScaledContentBitmap(scale, skbitmap_format, src_subrect,
+ result_callback);
}
void ContentViewCoreImpl::StartContentIntent(const GURL& content_url) {
@@ -1460,16 +1462,6 @@ jboolean ContentViewCoreImpl::OnAnimate(JNIEnv* env, jobject /* obj */,
return view->Animate(base::TimeTicks::FromInternalValue(frame_time_micros));
}
-jboolean ContentViewCoreImpl::PopulateBitmapFromCompositor(JNIEnv* env,
- jobject obj,
- jobject jbitmap) {
- RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
- if (!view)
- return false;
-
- return view->PopulateBitmapWithContents(jbitmap);
-}
-
void ContentViewCoreImpl::WasResized(JNIEnv* env, jobject obj) {
RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
if (view)
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698