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

Unified Diff: ui/compositor/layer.h

Issue 1002393002: Change ui::wm::Shadow to pass ImageSkia instead of SkBitmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Dana's comments. Created 5 years, 9 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 | 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 bcdbd4cf3a184cdee2d987ce509e440dde735555..3dbd1733b0b2982eacc194383e25f1dcc12a441e 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -28,6 +28,7 @@
#include "ui/compositor/layer_delegate.h"
#include "ui/compositor/layer_type.h"
#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/transform.h"
class SkCanvas;
@@ -300,10 +301,10 @@ 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, aperture and border. May only be
+ // Updates the nine patch layer's image, aperture and border. May only be
// called for LAYER_NINE_PATCH.
- void UpdateNinePatchLayerBitmap(const SkBitmap& bitmap);
- void UpdateNinePatchLayerAperture(const gfx::Rect& aperture);
+ void UpdateNinePatchLayerImage(const gfx::ImageSkia& image);
+ void UpdateNinePatchLayerAperture(const gfx::Rect& aperture_in_dip);
void UpdateNinePatchLayerBorder(const gfx::Rect& border);
// Adds |invalid_rect| to the Layer's pending invalid rect and calls
@@ -512,6 +513,11 @@ class COMPOSITOR_EXPORT Layer
// A cached copy of |Compositor::device_scale_factor()|.
float device_scale_factor_;
+ // A cached copy of the nine patch layer's image and aperture.
+ // These are required for device scale factor change.
+ gfx::ImageSkia nine_patch_layer_image_;
+ gfx::Rect nine_patch_layer_aperture_;
+
// The mailbox used by texture_layer_.
cc::TextureMailbox mailbox_;
« no previous file with comments | « no previous file | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698