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

Unified Diff: cc/trees/occlusion_tracker.cc

Issue 2176903002: cc: Fix occlusion tracking for layers with non-default blend modes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/occlusion_tracker.cc
diff --git a/cc/trees/occlusion_tracker.cc b/cc/trees/occlusion_tracker.cc
index 3b69c68318815065a5840b54e632fe6931ac250b..ad2f1a8460dc729a4e5a9a1fd22b5c72af923afe 100644
--- a/cc/trees/occlusion_tracker.cc
+++ b/cc/trees/occlusion_tracker.cc
@@ -350,8 +350,9 @@ void OcclusionTracker::MarkOccludedBehindLayer(const LayerImpl* layer) {
if (layer->draw_opacity() < 1)
return;
- if (!layer->uses_default_blend_mode())
- return;
+ // The only currently supported draw_blend_mode is SrcOver mode, so
+ // draw_blend_mode does not affect occlusion.
+ DCHECK_EQ(layer->draw_blend_mode(), SkXfermode::kSrcOver_Mode);
ajuma 2016/07/25 18:34:42 An alternative would be to delete draw_blend_mode
if (layer->Is3dSorted())
return;
« no previous file with comments | « no previous file | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698