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

Unified Diff: cc/layers/nine_patch_layer.h

Issue 1889153002: cc: nine patch: add occlusion support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky & aelias' changes Created 4 years, 8 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 | « no previous file | cc/layers/nine_patch_layer.cc » ('j') | cc/layers/nine_patch_layer_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/nine_patch_layer.h
diff --git a/cc/layers/nine_patch_layer.h b/cc/layers/nine_patch_layer.h
index 20b5e4934149f3fffc1343ca15626e49cf75c6bd..c81bf63df635e36b8865d9887a797ffcb75e491a 100644
--- a/cc/layers/nine_patch_layer.h
+++ b/cc/layers/nine_patch_layer.h
@@ -41,6 +41,11 @@ class CC_EXPORT NinePatchLayer : public UIResourceLayer {
void SetFillCenter(bool fill_center);
void SetNearestNeighbor(bool nearest_neighbor);
+ // |rect| is the space completely occluded by another layer in layer
+ // space. This can be used for example to occlude the entire window's
+ // content when drawing the shadow with a 9 patches layer.
+ void SetLayerOcclusion(const gfx::Rect& occlusion);
+
private:
NinePatchLayer();
~NinePatchLayer() override;
@@ -54,6 +59,10 @@ class CC_EXPORT NinePatchLayer : public UIResourceLayer {
// image space.
gfx::Rect image_aperture_;
+ // The occluded region in layer space set by SetLayerOcclusion. It is
+ // usually larger than |image_aperture_|.
+ gfx::Rect layer_occlusion_;
+
DISALLOW_COPY_AND_ASSIGN(NinePatchLayer);
};
« no previous file with comments | « no previous file | cc/layers/nine_patch_layer.cc » ('j') | cc/layers/nine_patch_layer_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698