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

Unified Diff: cc/resources/content_layer_updater.h

Issue 567743003: Fix bad scaling in TiledLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 6 years, 3 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 | « cc/resources/bitmap_skpicture_content_layer_updater.cc ('k') | cc/resources/content_layer_updater.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/content_layer_updater.h
diff --git a/cc/resources/content_layer_updater.h b/cc/resources/content_layer_updater.h
index c02759607c687f9869a7559e43fe14af03e27988..b11281e76cffaf8ab0b25f35342e5fbe7a10cf53 100644
--- a/cc/resources/content_layer_updater.h
+++ b/cc/resources/content_layer_updater.h
@@ -24,6 +24,7 @@ class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
void set_rendering_stats_instrumentation(RenderingStatsInstrumentation* rsi);
virtual void SetOpaque(bool opaque) OVERRIDE;
virtual void SetFillsBoundsCompletely(bool fills_bounds) OVERRIDE;
+ virtual void SetBackgroundColor(SkColor background_color) OVERRIDE;
protected:
ContentLayerUpdater(scoped_ptr<LayerPainter> painter,
@@ -31,17 +32,23 @@ class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
int layer_id);
virtual ~ContentLayerUpdater();
+ // Paints the contents. |content_size| size of the underlying layer in
+ // layer's content space. |paint_rect| bounds to paint in content space of the
+ // layer. Both |content_size| and |paint_rect| are in pixels.
void PaintContents(SkCanvas* canvas,
- const gfx::Rect& content_rect,
+ const gfx::Size& layer_content_size,
+ const gfx::Rect& paint_rect,
float contents_width_scale,
float contents_height_scale);
- gfx::Rect content_rect() const { return content_rect_; }
+ gfx::Rect paint_rect() const { return paint_rect_; }
bool layer_is_opaque() const { return layer_is_opaque_; }
bool layer_fills_bounds_completely() const {
return layer_fills_bounds_completely_;
}
+ SkColor background_color() const { return background_color_; }
+
RenderingStatsInstrumentation* rendering_stats_instrumentation_;
int layer_id_;
@@ -51,8 +58,9 @@ class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
bool layer_fills_bounds_completely_;
private:
- gfx::Rect content_rect_;
+ gfx::Rect paint_rect_;
scoped_ptr<LayerPainter> painter_;
+ SkColor background_color_;
DISALLOW_COPY_AND_ASSIGN(ContentLayerUpdater);
};
« no previous file with comments | « cc/resources/bitmap_skpicture_content_layer_updater.cc ('k') | cc/resources/content_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698