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

Unified Diff: cc/image_layer.h

Issue 11503005: cc: Refactor content scale/bounds into draw properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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 | « cc/draw_properties.h ('k') | cc/image_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/image_layer.h
diff --git a/cc/image_layer.h b/cc/image_layer.h
index f4f6cd7c2d88067acd71a7800ea01df585f94a6f..86d0dac629df95ed9a13d0d62dc4d2cfe8aea3a9 100644
--- a/cc/image_layer.h
+++ b/cc/image_layer.h
@@ -21,8 +21,11 @@ public:
virtual bool drawsContent() const OVERRIDE;
virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE;
virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, RenderingStats&) OVERRIDE;
- virtual float contentsScaleX() const OVERRIDE;
- virtual float contentsScaleY() const OVERRIDE;
+ virtual void calculateContentsScale(
+ float idealContentsScale,
+ float* contentsScaleX,
+ float* contentsScaleY,
+ gfx::Size* contentBounds) OVERRIDE;
void setBitmap(const SkBitmap& image);
@@ -34,7 +37,8 @@ private:
virtual LayerUpdater* updater() const OVERRIDE;
virtual void createUpdaterIfNeeded() OVERRIDE;
- virtual gfx::Size contentBounds() const OVERRIDE;
+ float imageContentsScaleX() const;
+ float imageContentsScaleY() const;
SkBitmap m_bitmap;
« no previous file with comments | « cc/draw_properties.h ('k') | cc/image_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698