| Index: cc/layers/nine_patch_layer_impl.cc
|
| diff --git a/cc/layers/nine_patch_layer_impl.cc b/cc/layers/nine_patch_layer_impl.cc
|
| index 1c76d110a9f0e6cf92344c5b50a7167fbf59eafe..0dd2b6fe14ba0652e8af337c62e3b1f974918713 100644
|
| --- a/cc/layers/nine_patch_layer_impl.cc
|
| +++ b/cc/layers/nine_patch_layer_impl.cc
|
| @@ -207,14 +207,14 @@ void NinePatchLayerImpl::AppendQuads(
|
| uv_top.width(),
|
| uv_left.height());
|
|
|
| - // Nothing is opaque here.
|
| - // TODO(danakj): Should we look at the SkBitmaps to determine opaqueness?
|
| gfx::Rect opaque_rect;
|
| gfx::Rect visible_rect;
|
| const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
|
| + const bool opaque = layer_tree_impl()->IsUIResourceOpaque(ui_resource_id_);
|
|
|
| visible_rect =
|
| occlusion_in_content_space.GetUnoccludedContentRect(layer_top_left);
|
| + opaque_rect = opaque ? visible_rect : gfx::Rect();
|
| if (!visible_rect.IsEmpty()) {
|
| TextureDrawQuad* quad =
|
| render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
|
| @@ -233,6 +233,7 @@ void NinePatchLayerImpl::AppendQuads(
|
|
|
| visible_rect =
|
| occlusion_in_content_space.GetUnoccludedContentRect(layer_top_right);
|
| + opaque_rect = opaque ? visible_rect : gfx::Rect();
|
| if (!visible_rect.IsEmpty()) {
|
| TextureDrawQuad* quad =
|
| render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
|
| @@ -251,6 +252,7 @@ void NinePatchLayerImpl::AppendQuads(
|
|
|
| visible_rect =
|
| occlusion_in_content_space.GetUnoccludedContentRect(layer_bottom_left);
|
| + opaque_rect = opaque ? visible_rect : gfx::Rect();
|
| if (!visible_rect.IsEmpty()) {
|
| TextureDrawQuad* quad =
|
| render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
|
| @@ -269,6 +271,7 @@ void NinePatchLayerImpl::AppendQuads(
|
|
|
| visible_rect =
|
| occlusion_in_content_space.GetUnoccludedContentRect(layer_bottom_right);
|
| + opaque_rect = opaque ? visible_rect : gfx::Rect();
|
| if (!visible_rect.IsEmpty()) {
|
| TextureDrawQuad* quad =
|
| render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
|
| @@ -286,6 +289,7 @@ void NinePatchLayerImpl::AppendQuads(
|
| }
|
|
|
| visible_rect = occlusion_in_content_space.GetUnoccludedContentRect(layer_top);
|
| + opaque_rect = opaque ? visible_rect : gfx::Rect();
|
| if (!visible_rect.IsEmpty()) {
|
| TextureDrawQuad* quad =
|
| render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
|
| @@ -304,6 +308,7 @@ void NinePatchLayerImpl::AppendQuads(
|
|
|
| visible_rect =
|
| occlusion_in_content_space.GetUnoccludedContentRect(layer_left);
|
| + opaque_rect = opaque ? visible_rect : gfx::Rect();
|
| if (!visible_rect.IsEmpty()) {
|
| TextureDrawQuad* quad =
|
| render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
|
| @@ -322,6 +327,7 @@ void NinePatchLayerImpl::AppendQuads(
|
|
|
| visible_rect =
|
| occlusion_in_content_space.GetUnoccludedContentRect(layer_right);
|
| + opaque_rect = opaque ? visible_rect : gfx::Rect();
|
| if (!visible_rect.IsEmpty()) {
|
| TextureDrawQuad* quad =
|
| render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
|
| @@ -340,6 +346,7 @@ void NinePatchLayerImpl::AppendQuads(
|
|
|
| visible_rect =
|
| occlusion_in_content_space.GetUnoccludedContentRect(layer_bottom);
|
| + opaque_rect = opaque ? visible_rect : gfx::Rect();
|
| if (!visible_rect.IsEmpty()) {
|
| TextureDrawQuad* quad =
|
| render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
|
| @@ -359,6 +366,7 @@ void NinePatchLayerImpl::AppendQuads(
|
| if (fill_center_) {
|
| visible_rect =
|
| occlusion_in_content_space.GetUnoccludedContentRect(layer_center);
|
| + opaque_rect = opaque ? visible_rect : gfx::Rect();
|
| if (!visible_rect.IsEmpty()) {
|
| TextureDrawQuad* quad =
|
| render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
|
|
|