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

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

Issue 13266002: cc: Pass RenderingStatsInstrumentation to ContentLayerUpdater (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « cc/resources/content_layer_updater.cc ('k') | cc/resources/skpicture_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_SKPICTURE_CONTENT_LAYER_UPDATER_H_ 5 #ifndef CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_
6 #define CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_ 6 #define CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_
7 7
8 #include "cc/resources/content_layer_updater.h" 8 #include "cc/resources/content_layer_updater.h"
9 #include "third_party/skia/include/core/SkPicture.h" 9 #include "third_party/skia/include/core/SkPicture.h"
10 10
(...skipping 22 matching lines...) Expand all
33 bool partial_update, 33 bool partial_update,
34 RenderingStats* stats) OVERRIDE; 34 RenderingStats* stats) OVERRIDE;
35 35
36 private: 36 private:
37 SkPictureContentLayerUpdater* updater_; 37 SkPictureContentLayerUpdater* updater_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(Resource); 39 DISALLOW_COPY_AND_ASSIGN(Resource);
40 }; 40 };
41 41
42 static scoped_refptr<SkPictureContentLayerUpdater> Create( 42 static scoped_refptr<SkPictureContentLayerUpdater> Create(
43 scoped_ptr<LayerPainter> painter); 43 scoped_ptr<LayerPainter> painter,
44 RenderingStatsInstrumentation* stats_instrumentation);
44 45
45 virtual scoped_ptr<LayerUpdater::Resource> CreateResource( 46 virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
46 PrioritizedResourceManager* manager) OVERRIDE; 47 PrioritizedResourceManager* manager) OVERRIDE;
47 virtual void SetOpaque(bool opaque) OVERRIDE; 48 virtual void SetOpaque(bool opaque) OVERRIDE;
48 49
49 protected: 50 protected:
50 explicit SkPictureContentLayerUpdater(scoped_ptr<LayerPainter> painter); 51 SkPictureContentLayerUpdater(
52 scoped_ptr<LayerPainter> painter,
53 RenderingStatsInstrumentation* stats_instrumentation);
51 virtual ~SkPictureContentLayerUpdater(); 54 virtual ~SkPictureContentLayerUpdater();
52 55
53 virtual void PrepareToUpdate(gfx::Rect content_rect, 56 virtual void PrepareToUpdate(gfx::Rect content_rect,
54 gfx::Size tile_size, 57 gfx::Size tile_size,
55 float contents_width_scale, 58 float contents_width_scale,
56 float contents_height_scale, 59 float contents_height_scale,
57 gfx::Rect* resulting_opaque_rect, 60 gfx::Rect* resulting_opaque_rect,
58 RenderingStats* stats) OVERRIDE; 61 RenderingStats* stats) OVERRIDE;
59 void DrawPicture(SkCanvas* canvas); 62 void DrawPicture(SkCanvas* canvas);
60 void UpdateTexture(ResourceUpdateQueue* queue, 63 void UpdateTexture(ResourceUpdateQueue* queue,
61 PrioritizedResource* texture, 64 PrioritizedResource* texture,
62 gfx::Rect source_rect, 65 gfx::Rect source_rect,
63 gfx::Vector2d dest_offset, 66 gfx::Vector2d dest_offset,
64 bool partial_update); 67 bool partial_update);
65 68
66 bool layer_is_opaque() const { return layer_is_opaque_; } 69 bool layer_is_opaque() const { return layer_is_opaque_; }
67 70
68 private: 71 private:
69 // Recording canvas. 72 // Recording canvas.
70 SkPicture picture_; 73 SkPicture picture_;
71 // True when it is known that all output pixels will be opaque. 74 // True when it is known that all output pixels will be opaque.
72 bool layer_is_opaque_; 75 bool layer_is_opaque_;
73 76
74 DISALLOW_COPY_AND_ASSIGN(SkPictureContentLayerUpdater); 77 DISALLOW_COPY_AND_ASSIGN(SkPictureContentLayerUpdater);
75 }; 78 };
76 79
77 } // namespace cc 80 } // namespace cc
78 81
79 #endif // CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_ 82 #endif // CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_
OLDNEW
« no previous file with comments | « cc/resources/content_layer_updater.cc ('k') | cc/resources/skpicture_content_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698