OLD | NEW |
---|---|
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 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; } | 105 void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; } |
106 | 106 |
107 void CreateDefaultTilingsAndTiles(); | 107 void CreateDefaultTilingsAndTiles(); |
108 void SetAllTilesVisible(); | 108 void SetAllTilesVisible(); |
109 void SetAllTilesReady(); | 109 void SetAllTilesReady(); |
110 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling); | 110 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling); |
111 void SetTileReady(Tile* tile); | 111 void SetTileReady(Tile* tile); |
112 void ResetAllTilesPriorities(); | 112 void ResetAllTilesPriorities(); |
113 PictureLayerTilingSet* GetTilings() { return tilings_.get(); } | 113 PictureLayerTilingSet* GetTilings() { return tilings_.get(); } |
114 | 114 |
115 size_t lost_output_surface_count() const { | |
danakj
2014/09/10 16:03:31
nit: release_resources_count?
sohanjg
2014/09/11 06:07:57
Done.
should we change in fakecontentlayerimpl too
| |
116 return lost_output_surface_count_; | |
117 } | |
118 void reset_lost_output_surface_count() { lost_output_surface_count_ = 0; } | |
119 | |
120 virtual void ReleaseResources() OVERRIDE; | |
121 | |
115 protected: | 122 protected: |
116 FakePictureLayerImpl( | 123 FakePictureLayerImpl( |
117 LayerTreeImpl* tree_impl, | 124 LayerTreeImpl* tree_impl, |
118 int id, | 125 int id, |
119 scoped_refptr<PicturePileImpl> pile); | 126 scoped_refptr<PicturePileImpl> pile); |
120 FakePictureLayerImpl(LayerTreeImpl* tree_impl, | 127 FakePictureLayerImpl(LayerTreeImpl* tree_impl, |
121 int id, | 128 int id, |
122 scoped_refptr<PicturePileImpl> pile, | 129 scoped_refptr<PicturePileImpl> pile, |
123 const gfx::Size& layer_bounds); | 130 const gfx::Size& layer_bounds); |
124 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id); | 131 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id); |
125 | 132 |
126 private: | 133 private: |
127 gfx::Size fixed_tile_size_; | 134 gfx::Size fixed_tile_size_; |
128 | 135 |
129 size_t append_quads_count_; | 136 size_t append_quads_count_; |
130 size_t did_become_active_call_count_; | 137 size_t did_become_active_call_count_; |
131 bool has_valid_tile_priorities_; | 138 bool has_valid_tile_priorities_; |
132 bool use_set_valid_tile_priorities_flag_; | 139 bool use_set_valid_tile_priorities_flag_; |
140 size_t lost_output_surface_count_; | |
133 }; | 141 }; |
134 | 142 |
135 } // namespace cc | 143 } // namespace cc |
136 | 144 |
137 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ | 145 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |