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

Side by Side Diff: cc/resources/content_layer_updater.h

Issue 222573002: cc: Add CHECKs that the backing size reported by canvas matches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: contentupdatercrash: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_RESOURCES_CONTENT_LAYER_UPDATER_H_ 5 #ifndef CC_RESOURCES_CONTENT_LAYER_UPDATER_H_
6 #define CC_RESOURCES_CONTENT_LAYER_UPDATER_H_ 6 #define CC_RESOURCES_CONTENT_LAYER_UPDATER_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/resources/layer_updater.h" 9 #include "cc/resources/layer_updater.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 14 matching lines...) Expand all
25 virtual void SetOpaque(bool opaque) OVERRIDE; 25 virtual void SetOpaque(bool opaque) OVERRIDE;
26 virtual void SetFillsBoundsCompletely(bool fills_bounds) OVERRIDE; 26 virtual void SetFillsBoundsCompletely(bool fills_bounds) OVERRIDE;
27 27
28 protected: 28 protected:
29 ContentLayerUpdater(scoped_ptr<LayerPainter> painter, 29 ContentLayerUpdater(scoped_ptr<LayerPainter> painter,
30 RenderingStatsInstrumentation* stats_instrumentation, 30 RenderingStatsInstrumentation* stats_instrumentation,
31 int layer_id); 31 int layer_id);
32 virtual ~ContentLayerUpdater(); 32 virtual ~ContentLayerUpdater();
33 33
34 void PaintContents(SkCanvas* canvas, 34 void PaintContents(SkCanvas* canvas,
35 const gfx::Point& origin, 35 const gfx::Rect& content_rect,
36 float contents_width_scale, 36 float contents_width_scale,
37 float contents_height_scale, 37 float contents_height_scale,
38 gfx::Rect* resulting_opaque_rect); 38 gfx::Rect* resulting_opaque_rect);
39 gfx::Rect content_rect() const { return content_rect_; } 39 gfx::Rect content_rect() const { return content_rect_; }
40 40
41 bool layer_is_opaque() const { return layer_is_opaque_; } 41 bool layer_is_opaque() const { return layer_is_opaque_; }
42 bool layer_fills_bounds_completely() const { 42 bool layer_fills_bounds_completely() const {
43 return layer_fills_bounds_completely_; 43 return layer_fills_bounds_completely_;
44 } 44 }
45 45
46 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 46 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
47 int layer_id_; 47 int layer_id_;
48 48
49 // True when it is known that all output pixels will be opaque. 49 // True when it is known that all output pixels will be opaque.
50 bool layer_is_opaque_; 50 bool layer_is_opaque_;
51 // True when it is known that all output pixels will be filled. 51 // True when it is known that all output pixels will be filled.
52 bool layer_fills_bounds_completely_; 52 bool layer_fills_bounds_completely_;
53 53
54 private: 54 private:
55 gfx::Rect content_rect_; 55 gfx::Rect content_rect_;
56 scoped_ptr<LayerPainter> painter_; 56 scoped_ptr<LayerPainter> painter_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(ContentLayerUpdater); 58 DISALLOW_COPY_AND_ASSIGN(ContentLayerUpdater);
59 }; 59 };
60 60
61 } // namespace cc 61 } // namespace cc
62 62
63 #endif // CC_RESOURCES_CONTENT_LAYER_UPDATER_H_ 63 #endif // CC_RESOURCES_CONTENT_LAYER_UPDATER_H_
OLDNEW
« 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