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

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: Daniel's nits 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..ab57c129b227fbc0bf356c8c47ef46db1426c534 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& rect);
aelias_OOO_until_Jul13 2016/04/20 05:54:57 nit: call the variable "occlusion", not "rect".
llandwerlin-old 2016/04/21 09:53:14 Done.
+
private:
NinePatchLayer();
~NinePatchLayer() override;
@@ -54,6 +59,9 @@ class CC_EXPORT NinePatchLayer : public UIResourceLayer {
// image space.
gfx::Rect image_aperture_;
+ // The occluded region in layer space set by SetLayerOcclusion.
aelias_OOO_until_Jul13 2016/04/20 05:54:57 Would it be accurate to write "May be larger than
llandwerlin-old 2016/04/21 09:53:14 Done.
+ 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