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

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

Issue 143803004: android: Migrate old content readback to use async readback (and delegated renderer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dtrainor comment leftover Created 6 years, 11 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 f84616f3bb9459da3c89a38660b3d7d69cc69ab3..4b74de4265d7191f733b3d1f0a9d8b272ecc5f9c 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -701,14 +701,17 @@ void ContentViewCoreImpl::ShowPastePopup(int x_dip, int y_dip) {
static_cast<jint>(y_dip));
}
-unsigned int ContentViewCoreImpl::GetScaledContentTexture(
+void ContentViewCoreImpl::GetScaledContentBitmap(
float scale,
- gfx::Size* out_size) {
+ gfx::Size* out_size,
+ const base::Callback<void(bool, const SkBitmap&)>& result_callback) {
RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
- if (!view)
- return 0;
+ if (!view) {
+ result_callback.Run(false, SkBitmap());
+ return;
+ }
- return view->GetScaledContentTexture(scale, out_size);
+ view->GetScaledContentBitmap(scale, out_size, result_callback);
}
void ContentViewCoreImpl::StartContentIntent(const GURL& content_url) {

Powered by Google App Engine
This is Rietveld 408576698