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

Unified Diff: cc/resources/content_layer_updater.h

Issue 23484005: Skip clearing the canvas before painting the contents of opaque layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unecessary newline Created 7 years, 4 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_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 6c8dee3bba70ca39e4dbddeae01589acb757e228..6959526ef1c77a916b03b53057f83f4604ba61d9 100644
--- a/cc/resources/content_layer_updater.h
+++ b/cc/resources/content_layer_updater.h
@@ -22,6 +22,7 @@ class RenderingStatsInstrumentation;
class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
public:
void set_rendering_stats_instrumentation(RenderingStatsInstrumentation* rsi);
+ virtual void SetOpaque(bool) OVERRIDE;
protected:
ContentLayerUpdater(scoped_ptr<LayerPainter> painter,
@@ -30,12 +31,14 @@ class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
virtual ~ContentLayerUpdater();
void PaintContents(SkCanvas* canvas,
- gfx::Rect content_rect,
+ gfx::Point origin,
float contents_width_scale,
float contents_height_scale,
gfx::Rect* resulting_opaque_rect);
gfx::Rect content_rect() const { return content_rect_; }
+ bool layer_is_opaque() const { return layer_is_opaque_; }
+
RenderingStatsInstrumentation* rendering_stats_instrumentation_;
int layer_id_;
@@ -43,6 +46,10 @@ class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
gfx::Rect content_rect_;
scoped_ptr<LayerPainter> painter_;
+ protected:
+ // True when it is known that all output pixels will be opaque.
+ bool layer_is_opaque_;
+
DISALLOW_COPY_AND_ASSIGN(ContentLayerUpdater);
};
« no previous file with comments | « cc/resources/bitmap_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