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

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

Issue 14205005: cc: Only consider layer clipped content rect for analysis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: linker fixes on windows 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/test/fake_content_layer_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_TEST_FAKE_PICTURE_PILE_IMPL_H_
6 #define CC_TEST_FAKE_PICTURE_PILE_IMPL_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "cc/resources/picture_pile_impl.h"
10 #include "cc/test/fake_content_layer_client.h"
11
12 namespace cc {
13
14 class FakePicturePileImpl : public PicturePileImpl {
15 public:
16 static scoped_refptr<FakePicturePileImpl> CreateFilledPile(
17 gfx::Size tile_size,
18 gfx::Size layer_bounds);
19
20 static scoped_refptr<FakePicturePileImpl> CreateEmptyPile(
21 gfx::Size tile_size,
22 gfx::Size layer_bounds);
23
24 TilingData& tiling() { return tiling_; }
25
26 void AddRecordingAt(int x, int y);
27
28 void RemoveRecordingAt(int x, int y);
29
30 void add_draw_rect(const gfx::Rect& rect) {
31 client_.add_draw_rect(rect, default_paint_);
32 }
33
34 void add_draw_rect_with_paint(gfx::Rect rect, const SkPaint& paint) {
35 client_.add_draw_rect(rect, paint);
36 }
37
38 void set_default_paint(const SkPaint& paint) {
39 default_paint_ = paint;
40 }
41
42 protected:
43 FakePicturePileImpl();
44 virtual ~FakePicturePileImpl();
45
46 FakeContentLayerClient client_;
47 SkPaint default_paint_;
48 };
49
50 } // namespace cc
51
52 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/test/fake_content_layer_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