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

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

Issue 85143002: Dirty rects always contain full tiles with delegated rendering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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 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_RESOURCES_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_ 5 #ifndef CC_RESOURCES_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_
6 #define CC_RESOURCES_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_ 6 #define CC_RESOURCES_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "cc/resources/bitmap_content_layer_updater.h" 9 #include "cc/resources/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 : public BitmapContentLayerUpdater { 14 class CachingBitmapContentLayerUpdater : public BitmapContentLayerUpdater {
15 public: 15 public:
16 static scoped_refptr<CachingBitmapContentLayerUpdater> Create( 16 static scoped_refptr<CachingBitmapContentLayerUpdater> Create(
17 scoped_ptr<LayerPainter>, 17 scoped_ptr<LayerPainter>,
18 RenderingStatsInstrumentation* stats_instrumentation, 18 RenderingStatsInstrumentation* stats_instrumentation,
19 int layer_id); 19 int layer_id);
20 20
21 virtual void PrepareToUpdate(gfx::Rect content_rect, 21 virtual void PrepareToUpdate(gfx::Rect content_rect,
22 gfx::Rect paint_rect,
22 gfx::Size tile_size, 23 gfx::Size tile_size,
23 float contents_width_scale, 24 float contents_width_scale,
24 float contents_height_scale, 25 float contents_height_scale,
25 gfx::Rect* resulting_opaque_rect) OVERRIDE; 26 gfx::Rect* resulting_opaque_rect) OVERRIDE;
26 27
27 bool pixels_did_change() const { 28 bool pixels_did_change() const {
28 return pixels_did_change_; 29 return pixels_did_change_;
29 } 30 }
30 31
31 private: 32 private:
32 CachingBitmapContentLayerUpdater( 33 CachingBitmapContentLayerUpdater(
33 scoped_ptr<LayerPainter> painter, 34 scoped_ptr<LayerPainter> painter,
34 RenderingStatsInstrumentation* stats_instrumentation, 35 RenderingStatsInstrumentation* stats_instrumentation,
35 int layer_id); 36 int layer_id);
36 virtual ~CachingBitmapContentLayerUpdater(); 37 virtual ~CachingBitmapContentLayerUpdater();
37 38
38 bool pixels_did_change_; 39 bool pixels_did_change_;
39 SkBitmap cached_bitmap_; 40 SkBitmap cached_bitmap_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(CachingBitmapContentLayerUpdater); 42 DISALLOW_COPY_AND_ASSIGN(CachingBitmapContentLayerUpdater);
42 }; 43 };
43 44
44 } // namespace cc 45 } // namespace cc
45 46
46 #endif // CC_RESOURCES_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_ 47 #endif // CC_RESOURCES_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698