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..e1056be6c07468073e93505d8ed3d9e1e2921219 100644 |
--- a/cc/layers/delegated_renderer_layer_impl.cc |
+++ b/cc/layers/delegated_renderer_layer_impl.cc |
@@ -255,7 +255,6 @@ bool DelegatedRendererLayerImpl::WillDraw(DrawMode draw_mode, |
void DelegatedRendererLayerImpl::AppendQuads( |
RenderPass* render_pass, |
- const Occlusion& occlusion_in_content_space, |
AppendQuadsData* append_quads_data) { |
AppendRainbowDebugBorder(render_pass); |
@@ -282,7 +281,6 @@ void DelegatedRendererLayerImpl::AppendQuads( |
DCHECK(target_render_pass_id.layer_id == render_target()->id()); |
AppendRenderPassQuads(render_pass, |
- occlusion_in_content_space, |
root_delegated_render_pass, |
frame_size); |
} else { |
@@ -293,7 +291,6 @@ void DelegatedRendererLayerImpl::AppendQuads( |
const RenderPass* delegated_render_pass = |
render_passes_in_draw_order_[render_pass_index]; |
AppendRenderPassQuads(render_pass, |
- occlusion_in_content_space, |
delegated_render_pass, |
frame_size); |
} |
@@ -349,39 +346,52 @@ 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()) { |
+ // Draws a stripe filling the layer vertically with the same color and |
+ // width as the horizontal stipes along the layer's top border. |
+ SolidColorDrawQuad* solid_quad = |
+ render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
+ // The inner fill is more transparent then the border. |
+ static const float kFillOpacity = 0.1f; |
+ SkColor fill_color = SkColorSetA( |
+ colors[i % kNumColors], |
+ static_cast<uint8_t>(SkColorGetA(colors[i % kNumColors]) * |
+ kFillOpacity)); |
+ gfx::Rect fill_rect(x, 0, width, content_bounds().height()); |
+ 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); |
} |
} |
} |
void DelegatedRendererLayerImpl::AppendRenderPassQuads( |
RenderPass* render_pass, |
- const Occlusion& occlusion_in_content_space, |
const RenderPass* delegated_render_pass, |
const gfx::Size& frame_size) const { |
const SharedQuadState* delegated_shared_quad_state = nullptr; |
@@ -437,8 +447,9 @@ void DelegatedRendererLayerImpl::AppendRenderPassQuads( |
} |
Occlusion occlusion_in_quad_space = |
- occlusion_in_content_space.GetOcclusionWithGivenDrawTransform( |
- quad_content_to_delegated_target_space); |
+ draw_properties() |
+ .occlusion_in_content_space.GetOcclusionWithGivenDrawTransform( |
+ quad_content_to_delegated_target_space); |
gfx::Rect quad_visible_rect = |
occlusion_in_quad_space.GetUnoccludedContentRect( |