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

Unified Diff: cc/layers/solid_color_layer_impl.cc

Issue 2859483006: cc: Enable composited border-radius scrolling.
Patch Set: Fix webkit unit tests. Created 3 years, 7 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 | « cc/layers/solid_color_layer_impl.h ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/solid_color_layer_impl.cc
diff --git a/cc/layers/solid_color_layer_impl.cc b/cc/layers/solid_color_layer_impl.cc
index c5b7574ccee75d9668ba91352810537a98116766..a85b8406d4005cee3e6ba727f922c87160c5162c 100644
--- a/cc/layers/solid_color_layer_impl.cc
+++ b/cc/layers/solid_color_layer_impl.cc
@@ -33,11 +33,13 @@ void SolidColorLayerImpl::AppendSolidQuads(
SharedQuadState* shared_quad_state,
const gfx::Rect& visible_layer_rect,
SkColor color,
- AppendQuadsData* append_quads_data) {
+ AppendQuadsData* append_quads_data,
+ Layer::LayerMaskType mask_type) {
float alpha =
(SkColorGetA(color) * (1.0f / 255.0f)) * shared_quad_state->opacity;
DCHECK_EQ(SkBlendMode::kSrcOver, shared_quad_state->blend_mode);
- if (alpha < std::numeric_limits<float>::epsilon())
+ if (alpha < std::numeric_limits<float>::epsilon() &&
+ mask_type != Layer::LayerMaskType::MULTI_TEXTURE_MASK)
enne (OOO) 2017/05/12 17:51:33 Why must these noop solid color quads not be skipp
sunxd 2017/05/15 17:57:36 It was because mask layer's opacity is not calcula
return;
// We create a series of smaller quads instead of just one large one so that
// the culler can reduce the total pixels drawn.
@@ -81,7 +83,7 @@ void SolidColorLayerImpl::AppendQuads(
// |bounds()| here.
AppendSolidQuads(render_pass, draw_properties().occlusion_in_content_space,
shared_quad_state, gfx::Rect(bounds()), background_color(),
- append_quads_data);
+ append_quads_data, Layer::LayerMaskType::NOT_MASK);
}
const char* SolidColorLayerImpl::LayerTypeAsString() const {
« no previous file with comments | « cc/layers/solid_color_layer_impl.h ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698