Index: cc/layers/nine_patch_layer.cc |
diff --git a/cc/layers/nine_patch_layer.cc b/cc/layers/nine_patch_layer.cc |
index b68891cf51e3d44e1dcfcdda97003bbf90030163..84aaee542c47e7ce86d05ec9a73ca7eaa723d704 100644 |
--- a/cc/layers/nine_patch_layer.cc |
+++ b/cc/layers/nine_patch_layer.cc |
@@ -57,6 +57,14 @@ void NinePatchLayer::SetNearestNeighbor(bool nearest_neighbor) { |
SetNeedsCommit(); |
} |
+void NinePatchLayer::SetLayerOcclusion(const gfx::Rect& occlusion) { |
+ if (layer_occlusion_ == occlusion) |
+ return; |
+ |
+ layer_occlusion_ = occlusion; |
+ SetNeedsCommit(); |
+} |
+ |
void NinePatchLayer::PushPropertiesTo(LayerImpl* layer) { |
UIResourceLayer::PushPropertiesTo(layer); |
TRACE_EVENT0("cc", "NinePatchLayer::PushPropertiesTo"); |
@@ -67,8 +75,8 @@ void NinePatchLayer::PushPropertiesTo(LayerImpl* layer) { |
} else { |
DCHECK(layer_tree_host()); |
- layer_impl->SetLayout(image_aperture_, border_, fill_center_, |
- nearest_neighbor_); |
+ layer_impl->SetLayout(image_aperture_, border_, layer_occlusion_, |
+ fill_center_, nearest_neighbor_); |
} |
} |