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

Side by Side Diff: cc/test/fake_picture_pile_impl.h

Issue 196343005: cc: Replace recorded region with direct map lookup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Partial invalidation test case Created 6 years, 9 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/test/fake_picture_layer_tiling_client.cc ('k') | cc/test/fake_picture_pile_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_TEST_FAKE_PICTURE_PILE_IMPL_H_ 5 #ifndef CC_TEST_FAKE_PICTURE_PILE_IMPL_H_
6 #define CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ 6 #define CC_TEST_FAKE_PICTURE_PILE_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "cc/resources/picture_pile_impl.h" 9 #include "cc/resources/picture_pile_impl.h"
10 #include "cc/test/fake_content_layer_client.h" 10 #include "cc/test/fake_content_layer_client.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class FakePicturePileImpl : public PicturePileImpl { 14 class FakePicturePileImpl : public PicturePileImpl {
15 public: 15 public:
16 static scoped_refptr<FakePicturePileImpl> CreateFilledPile( 16 static scoped_refptr<FakePicturePileImpl> CreateFilledPile(
17 const gfx::Size& tile_size, 17 const gfx::Size& tile_size,
18 const gfx::Size& layer_bounds); 18 const gfx::Size& layer_bounds);
19
20 static scoped_refptr<FakePicturePileImpl> CreateEmptyPile( 19 static scoped_refptr<FakePicturePileImpl> CreateEmptyPile(
21 const gfx::Size& tile_size, 20 const gfx::Size& tile_size,
22 const gfx::Size& layer_bounds); 21 const gfx::Size& layer_bounds);
23 22 static scoped_refptr<FakePicturePileImpl>
24 static scoped_refptr<FakePicturePileImpl> CreatePileWithRecordedRegion( 23 CreateEmptyPileThatThinksItHasRecordings(const gfx::Size& tile_size,
25 const gfx::Size& tile_size, 24 const gfx::Size& layer_bounds);
26 const gfx::Size& layer_bounds, 25 static scoped_refptr<FakePicturePileImpl> CreateInfiniteFilledPile();
27 const Region& recorded_region);
28
29 static scoped_refptr<FakePicturePileImpl> CreatePile();
30 26
31 TilingData& tiling() { return tiling_; } 27 TilingData& tiling() { return tiling_; }
32 28
33 void AddRecordingAt(int x, int y); 29 void AddRecordingAt(int x, int y);
34 void RemoveRecordingAt(int x, int y); 30 void RemoveRecordingAt(int x, int y);
35 void RerecordPile(); 31 void RerecordPile();
36 32
37 void add_draw_rect(const gfx::RectF& rect) { 33 void add_draw_rect(const gfx::RectF& rect) {
38 client_.add_draw_rect(rect, default_paint_); 34 client_.add_draw_rect(rect, default_paint_);
39 } 35 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 FakePicturePileImpl(); 68 FakePicturePileImpl();
73 virtual ~FakePicturePileImpl(); 69 virtual ~FakePicturePileImpl();
74 70
75 FakeContentLayerClient client_; 71 FakeContentLayerClient client_;
76 SkPaint default_paint_; 72 SkPaint default_paint_;
77 }; 73 };
78 74
79 } // namespace cc 75 } // namespace cc
80 76
81 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ 77 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_tiling_client.cc ('k') | cc/test/fake_picture_pile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698