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

Unified Diff: chrome/browser/ui/android/context_menu_helper.cc

Issue 2943363003: Fixing transparent pixels appearing black when rendered for the context menu. (Closed)
Patch Set: Created 3 years, 6 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: chrome/browser/ui/android/context_menu_helper.cc
diff --git a/chrome/browser/ui/android/context_menu_helper.cc b/chrome/browser/ui/android/context_menu_helper.cc
index 0d677d1e7007e6dc353d104179763c2a70974cda..8313bae0b273dbf7813db4f4b710e5fb47c6d7a8 100644
--- a/chrome/browser/ui/android/context_menu_helper.cc
+++ b/chrome/browser/ui/android/context_menu_helper.cc
@@ -37,6 +37,8 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(ContextMenuHelper);
const char kDataReductionProxyPassthroughHeader[] =
"Chrome-Proxy-Accept-Transform: identity\r\n";
+const bool kUsePNGCodec = true;
+
namespace {
void OnRetrieveImage(chrome::mojom::ThumbnailCapturerPtr thumbnail_capturer,
@@ -176,7 +178,7 @@ void ContextMenuHelper::RetrieveImage(JNIEnv* env,
// there's either a connection error or a response.
auto* thumbnail_capturer_proxy = thumbnail_capturer.get();
thumbnail_capturer_proxy->RequestThumbnailForContextNode(
- 0, gfx::Size(max_dimen_px, max_dimen_px),
+ 0, gfx::Size(max_dimen_px, max_dimen_px), kUsePNGCodec,
base::Bind(&OnRetrieveImage, base::Passed(&thumbnail_capturer),
base::android::ScopedJavaGlobalRef<jobject>(env, jcallback)));
}

Powered by Google App Engine
This is Rietveld 408576698