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

Side by Side Diff: cc/caching_bitmap_content_layer_updater.h

Issue 12095053: cc: Avoid expensive RenderingStats collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 10 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_ 5 #ifndef CC_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_
6 #define CC_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_ 6 #define CC_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "cc/bitmap_content_layer_updater.h" 9 #include "cc/bitmap_content_layer_updater.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class CachingBitmapContentLayerUpdater 14 class CachingBitmapContentLayerUpdater
15 : public BitmapContentLayerUpdater { 15 : public BitmapContentLayerUpdater {
16 public: 16 public:
17 static scoped_refptr<CachingBitmapContentLayerUpdater> Create( 17 static scoped_refptr<CachingBitmapContentLayerUpdater> Create(
18 scoped_ptr<LayerPainter>); 18 scoped_ptr<LayerPainter>);
19 19
20 virtual void prepareToUpdate(const gfx::Rect& content_rect, 20 virtual void prepareToUpdate(const gfx::Rect& content_rect,
21 const gfx::Size& tile_size, 21 const gfx::Size& tile_size,
22 float contents_width_scale, 22 float contents_width_scale,
23 float contents_height_scale, 23 float contents_height_scale,
24 gfx::Rect& resulting_opaque_rect, 24 gfx::Rect& resulting_opaque_rect,
25 RenderingStats&) OVERRIDE; 25 RenderingStats*) OVERRIDE;
26 26
27 bool pixelsDidChange() const; 27 bool pixelsDidChange() const;
28 28
29 private: 29 private:
30 explicit CachingBitmapContentLayerUpdater( 30 explicit CachingBitmapContentLayerUpdater(
31 scoped_ptr<LayerPainter> painter); 31 scoped_ptr<LayerPainter> painter);
32 virtual ~CachingBitmapContentLayerUpdater(); 32 virtual ~CachingBitmapContentLayerUpdater();
33 33
34 bool pixels_did_change_; 34 bool pixels_did_change_;
35 SkBitmap cached_bitmap_; 35 SkBitmap cached_bitmap_;
36 }; 36 };
37 37
38 } // namespace cc 38 } // namespace cc
39 39
40 #endif // CC_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_ 40 #endif // CC_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_
OLDNEW
« no previous file with comments | « cc/bitmap_skpicture_content_layer_updater.cc ('k') | cc/caching_bitmap_content_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698