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

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

Issue 235753002: cc: Give TilingData a Rect instead of a Size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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_LAYER_IMPL_H_ 5 #ifndef CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
6 #define CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 6 #define CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/layers/picture_layer_impl.h" 9 #include "cc/layers/picture_layer_impl.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 class FakePictureLayerImpl : public PictureLayerImpl { 13 class FakePictureLayerImpl : public PictureLayerImpl {
14 public: 14 public:
15 static scoped_ptr<FakePictureLayerImpl> Create( 15 static scoped_ptr<FakePictureLayerImpl> Create(
16 LayerTreeImpl* tree_impl, int id) { 16 LayerTreeImpl* tree_impl, int id) {
17 return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id)); 17 return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id));
18 } 18 }
19 19
20 static scoped_ptr<FakePictureLayerImpl> CreateWithPile( 20 static scoped_ptr<FakePictureLayerImpl> CreateWithPile(
21 LayerTreeImpl* tree_impl, int id, scoped_refptr<PicturePileImpl> pile) { 21 LayerTreeImpl* tree_impl, int id, scoped_refptr<PicturePileImpl> pile,
22 return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id, pile)); 22 const gfx::Size& layer_bounds) {
23 return make_scoped_ptr(new FakePictureLayerImpl(
24 tree_impl, id, pile, layer_bounds));
23 } 25 }
24 26
25 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) 27 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
26 OVERRIDE; 28 OVERRIDE;
27 virtual void AppendQuads(QuadSink* quad_sink, 29 virtual void AppendQuads(QuadSink* quad_sink,
28 AppendQuadsData* append_quads_data) OVERRIDE; 30 AppendQuadsData* append_quads_data) OVERRIDE;
29 virtual gfx::Size CalculateTileSize( 31 virtual gfx::Size CalculateTileSize(
30 const gfx::Size& content_bounds) const OVERRIDE; 32 const gfx::Size& content_bounds) const OVERRIDE;
31 33
32 using PictureLayerImpl::AddTiling; 34 using PictureLayerImpl::AddTiling;
(...skipping 28 matching lines...) Expand all
61 void CreateDefaultTilingsAndTiles(); 63 void CreateDefaultTilingsAndTiles();
62 void SetAllTilesVisible(); 64 void SetAllTilesVisible();
63 void SetAllTilesReady(); 65 void SetAllTilesReady();
64 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling); 66 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling);
65 void ResetAllTilesPriorities(); 67 void ResetAllTilesPriorities();
66 68
67 protected: 69 protected:
68 FakePictureLayerImpl( 70 FakePictureLayerImpl(
69 LayerTreeImpl* tree_impl, 71 LayerTreeImpl* tree_impl,
70 int id, 72 int id,
71 scoped_refptr<PicturePileImpl> pile); 73 scoped_refptr<PicturePileImpl> pile,
74 const gfx::Size& layer_bounds);
72 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id); 75 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id);
73 76
74 private: 77 private:
75 gfx::Size fixed_tile_size_; 78 gfx::Size fixed_tile_size_;
76 79
77 size_t append_quads_count_; 80 size_t append_quads_count_;
78 }; 81 };
79 82
80 } // namespace cc 83 } // namespace cc
81 84
82 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 85 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698