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

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: Fix int/size_t compilation issue 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..99db507e26dd6bc1a2c8c54beada2d9ef3dcd543 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 completly occluded by another layer in layer space.
Daniel Erat 2016/04/15 15:38:45 nit: s/completly/completely/
llandwerlin-old 2016/04/18 15:08:20 Done.
+ // 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);
+
private:
NinePatchLayer();
~NinePatchLayer() override;
@@ -54,6 +59,8 @@ class CC_EXPORT NinePatchLayer : public UIResourceLayer {
// image space.
gfx::Rect image_aperture_;
+ gfx::Rect layer_occlusion_;
Daniel Erat 2016/04/15 15:38:45 nit: add a brief comment describing this member (m
llandwerlin-old 2016/04/18 15:08:20 Done.
+
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