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

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: Handle device scale factor change. 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') | ui/compositor/layer.cc » ('J')
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..b446e16cead1760b27cf804aa831c6cf56fe9901 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,9 +301,9 @@ 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 UpdateNinePatchLayerImage(const gfx::ImageSkia& image);
void UpdateNinePatchLayerAperture(const gfx::Rect& aperture);
void UpdateNinePatchLayerBorder(const gfx::Rect& border);
@@ -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') | ui/compositor/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698