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

Unified Diff: ui/compositor/layer.h

Issue 385123005: Change ui::wm::Shadow to use cc::NinePatchLayer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Separate update functions for Bitmap/Border. The border needs to be clamped to stay within layer bo… Created 6 years, 5 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 | « ui/compositor/debug_utils.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index 03041edb872c1f4f66cec65a457f3ebf5aecd4ba..d5e24ec22233db4221043268e449077440f94f8e 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -36,6 +36,7 @@ class CopyOutputRequest;
class DelegatedFrameProvider;
class DelegatedRendererLayer;
class Layer;
+class NinePatchLayer;
class ResourceUpdateQueue;
class SolidColorLayer;
class TextureLayer;
@@ -276,6 +277,15 @@ class COMPOSITOR_EXPORT Layer
// Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR.
void SetColor(SkColor color);
+ // Updates the nine patch layer's bitmap and aperture. May only be called for
+ // LAYER_NINE_PATCH.
+ void UpdateNinePatchLayerBitmap(const SkBitmap& bitmap,
+ const gfx::Rect& aperture);
+
+ // Updates the nine patch layer's border. May only be called for
+ // LAYER_NINE_PATCH.
+ void UpdateNinePatchLayerBorder(const gfx::Rect& border);
+
// Adds |invalid_rect| to the Layer's pending invalid rect and calls
// ScheduleDraw(). Returns false if the paint request is ignored.
bool SchedulePaint(const gfx::Rect& invalid_rect);
@@ -469,6 +479,7 @@ class COMPOSITOR_EXPORT Layer
// Ownership of the layer is held through one of the strongly typed layer
// pointers, depending on which sort of layer this is.
scoped_refptr<cc::Layer> content_layer_;
+ scoped_refptr<cc::NinePatchLayer> nine_patch_layer_;
scoped_refptr<cc::TextureLayer> texture_layer_;
scoped_refptr<cc::SolidColorLayer> solid_color_layer_;
scoped_refptr<cc::DelegatedRendererLayer> delegated_renderer_layer_;
« no previous file with comments | « ui/compositor/debug_utils.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698