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

Unified Diff: cc/layers/delegated_renderer_layer_impl.cc

Issue 917763003: cc: Move occlusion debug rects into the debug layer borders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: cc/layers/delegated_renderer_layer_impl.cc
diff --git a/cc/layers/delegated_renderer_layer_impl.cc b/cc/layers/delegated_renderer_layer_impl.cc
index 8a95b9e9137f26dbb68ad2241011a5132fc9cde2..dfeb080513b1b5dc4d464883815a588e82d29f2f 100644
--- a/cc/layers/delegated_renderer_layer_impl.cc
+++ b/cc/layers/delegated_renderer_layer_impl.cc
@@ -349,32 +349,42 @@ void DelegatedRendererLayerImpl::AppendRainbowDebugBorder(
break;
if (!top.IsEmpty()) {
+ bool force_anti_aliasing_off = false;
SolidColorDrawQuad* top_quad =
render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
- top_quad->SetNew(
- shared_quad_state, top, top, colors[i % kNumColors], false);
+ top_quad->SetNew(shared_quad_state, top, top, colors[i % kNumColors],
+ force_anti_aliasing_off);
SolidColorDrawQuad* bottom_quad =
render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
- bottom_quad->SetNew(shared_quad_state,
- bottom,
- bottom,
+ bottom_quad->SetNew(shared_quad_state, bottom, bottom,
colors[kNumColors - 1 - (i % kNumColors)],
- false);
+ force_anti_aliasing_off);
+
+ if (contents_opaque()) {
+ SolidColorDrawQuad* solid_quad =
+ render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
+ // The inner fill is more transparent then the border.
+ SkColor fill_color = SkColorSetA(
+ colors[i % kNumColors],
+ static_cast<uint8_t>(SkColorGetA(colors[i % kNumColors]) * 0.1f));
vmpstr 2015/02/11 22:22:22 nit: make 0.1 a kConstant above? maybe?
danakj 2015/02/11 23:44:01 Done.
+ gfx::Rect fill_rect(x, 0, width, content_bounds().height());
vmpstr 2015/02/11 22:22:22 Can you put a comment saying that blah blah vertic
danakj 2015/02/11 23:44:01 Done.
+ solid_quad->SetNew(shared_quad_state, fill_rect, fill_rect, fill_color,
+ force_anti_aliasing_off);
+ }
}
if (!left.IsEmpty()) {
+ bool force_anti_aliasing_off = false;
SolidColorDrawQuad* left_quad =
render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
- left_quad->SetNew(shared_quad_state,
- left,
- left,
+ left_quad->SetNew(shared_quad_state, left, left,
colors[kNumColors - 1 - (i % kNumColors)],
- false);
+ force_anti_aliasing_off);
SolidColorDrawQuad* right_quad =
render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
- right_quad->SetNew(
- shared_quad_state, right, right, colors[i % kNumColors], false);
+ right_quad->SetNew(shared_quad_state, right, right,
+ colors[i % kNumColors], force_anti_aliasing_off);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698