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

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

Issue 13245007: cc: Remove RenderingStats passed to ContentLayerUpdater during Layer::Update() (Closed) Base URL: http://git.chromium.org/chromium/src.git@three
Patch Set: Rebase to 208926 Created 7 years, 5 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
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_BITMAP_SKPICTURE_CONTENT_LAYER_UPDATER_H_ 5 #ifndef CC_RESOURCES_BITMAP_SKPICTURE_CONTENT_LAYER_UPDATER_H_
6 #define CC_RESOURCES_BITMAP_SKPICTURE_CONTENT_LAYER_UPDATER_H_ 6 #define CC_RESOURCES_BITMAP_SKPICTURE_CONTENT_LAYER_UPDATER_H_
7 7
8 #include "cc/resources/skpicture_content_layer_updater.h" 8 #include "cc/resources/skpicture_content_layer_updater.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 // This class records the content_rect into an SkPicture, then software 13 // This class records the content_rect into an SkPicture, then software
14 // rasterizes the SkPicture into bitmaps for each tile. This implements 14 // rasterizes the SkPicture into bitmaps for each tile. This implements
15 // LayerTreeSettingSettings::per_tile_painting_enabled. 15 // LayerTreeSettingSettings::per_tile_painting_enabled.
16 class BitmapSkPictureContentLayerUpdater : public SkPictureContentLayerUpdater { 16 class BitmapSkPictureContentLayerUpdater : public SkPictureContentLayerUpdater {
17 public: 17 public:
18 class Resource : public ContentLayerUpdater::Resource { 18 class Resource : public ContentLayerUpdater::Resource {
19 public: 19 public:
20 Resource(BitmapSkPictureContentLayerUpdater* updater, 20 Resource(BitmapSkPictureContentLayerUpdater* updater,
21 scoped_ptr<PrioritizedResource> texture); 21 scoped_ptr<PrioritizedResource> texture);
22 22
23 virtual void Update(ResourceUpdateQueue* queue, 23 virtual void Update(ResourceUpdateQueue* queue,
24 gfx::Rect source_rect, 24 gfx::Rect source_rect,
25 gfx::Vector2d dest_offset, 25 gfx::Vector2d dest_offset,
26 bool partial_update, 26 bool partial_update) OVERRIDE;
27 RenderingStats* stats) OVERRIDE;
28 27
29 private: 28 private:
30 SkBitmap bitmap_; 29 SkBitmap bitmap_;
31 BitmapSkPictureContentLayerUpdater* updater_; 30 BitmapSkPictureContentLayerUpdater* updater_;
32 31
33 DISALLOW_COPY_AND_ASSIGN(Resource); 32 DISALLOW_COPY_AND_ASSIGN(Resource);
34 }; 33 };
35 34
36 static scoped_refptr<BitmapSkPictureContentLayerUpdater> Create( 35 static scoped_refptr<BitmapSkPictureContentLayerUpdater> Create(
37 scoped_ptr<LayerPainter> painter, 36 scoped_ptr<LayerPainter> painter,
38 RenderingStatsInstrumentation* stats_instrumentation, 37 RenderingStatsInstrumentation* stats_instrumentation,
39 int layer_id); 38 int layer_id);
40 39
41 virtual scoped_ptr<LayerUpdater::Resource> CreateResource( 40 virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
42 PrioritizedResourceManager* manager) OVERRIDE; 41 PrioritizedResourceManager* manager) OVERRIDE;
43 void PaintContentsRect(SkCanvas* canvas, 42 void PaintContentsRect(SkCanvas* canvas,
44 gfx::Rect source_rect, 43 gfx::Rect source_rect);
45 RenderingStats* stats);
46 44
47 private: 45 private:
48 BitmapSkPictureContentLayerUpdater( 46 BitmapSkPictureContentLayerUpdater(
49 scoped_ptr<LayerPainter> painter, 47 scoped_ptr<LayerPainter> painter,
50 RenderingStatsInstrumentation* stats_instrumentation, 48 RenderingStatsInstrumentation* stats_instrumentation,
51 int layer_id); 49 int layer_id);
52 virtual ~BitmapSkPictureContentLayerUpdater(); 50 virtual ~BitmapSkPictureContentLayerUpdater();
53 51
54 DISALLOW_COPY_AND_ASSIGN(BitmapSkPictureContentLayerUpdater); 52 DISALLOW_COPY_AND_ASSIGN(BitmapSkPictureContentLayerUpdater);
55 }; 53 };
56 54
57 } // namespace cc 55 } // namespace cc
58 56
59 #endif // CC_RESOURCES_BITMAP_SKPICTURE_CONTENT_LAYER_UPDATER_H_ 57 #endif // CC_RESOURCES_BITMAP_SKPICTURE_CONTENT_LAYER_UPDATER_H_
OLDNEW
« no previous file with comments | « cc/resources/bitmap_content_layer_updater.cc ('k') | cc/resources/bitmap_skpicture_content_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698