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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 2201483002: Improve transition between opaque and translucent compositor views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: now without VR-breaking badness Created 3 years, 9 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
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/compositor/CompositorSurfaceManagerTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 032239f506d355024d1abcbbaaac0c30bc45ea85..5bb81c420a5eb645a20963c1a9662a28c9cef227 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -175,6 +175,12 @@ gpu::gles2::ContextCreationAttribHelper GetCompositorContextAttributes(
// specified
// (IOW check that a <= 0 && rgb > 0 && rgb <= 565) then alpha should be
// -1.
+ // TODO(liberato): This condition is memorized in ComositorView.java, to
+ // avoid using two surfaces temporarily during alpha <-> no alpha
+ // transitions. If these mismatch, then we risk a power regression if the
+ // SurfaceView is not marked as eOpaque (FORMAT_OPAQUE), and we have an
+ // EGL surface with an alpha channel. SurfaceFlinger needs at least one of
+ // those hints to optimize out alpha blending.
attributes.alpha_size = 0;
attributes.red_size = 5;
attributes.green_size = 6;
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/compositor/CompositorSurfaceManagerTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698