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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; } | 104 void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; } |
105 | 105 |
106 void CreateDefaultTilingsAndTiles(); | 106 void CreateDefaultTilingsAndTiles(); |
107 void SetAllTilesVisible(); | 107 void SetAllTilesVisible(); |
108 void SetAllTilesReady(); | 108 void SetAllTilesReady(); |
109 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling); | 109 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling); |
110 void ResetAllTilesPriorities(); | 110 void ResetAllTilesPriorities(); |
111 PictureLayerTilingSet* GetTilings() { return tilings_.get(); } | 111 PictureLayerTilingSet* GetTilings() { return tilings_.get(); } |
112 | 112 |
| 113 size_t lost_output_surface_count() const { |
| 114 return lost_output_surface_count_; |
| 115 } |
| 116 void reset_lost_output_surface_count() { lost_output_surface_count_ = 0; } |
| 117 |
| 118 virtual void ReleaseResources() OVERRIDE; |
| 119 |
113 protected: | 120 protected: |
114 FakePictureLayerImpl( | 121 FakePictureLayerImpl( |
115 LayerTreeImpl* tree_impl, | 122 LayerTreeImpl* tree_impl, |
116 int id, | 123 int id, |
117 scoped_refptr<PicturePileImpl> pile); | 124 scoped_refptr<PicturePileImpl> pile); |
118 FakePictureLayerImpl(LayerTreeImpl* tree_impl, | 125 FakePictureLayerImpl(LayerTreeImpl* tree_impl, |
119 int id, | 126 int id, |
120 scoped_refptr<PicturePileImpl> pile, | 127 scoped_refptr<PicturePileImpl> pile, |
121 const gfx::Size& layer_bounds); | 128 const gfx::Size& layer_bounds); |
122 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id); | 129 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id); |
123 | 130 |
124 private: | 131 private: |
125 gfx::Size fixed_tile_size_; | 132 gfx::Size fixed_tile_size_; |
126 | 133 |
127 size_t append_quads_count_; | 134 size_t append_quads_count_; |
128 size_t did_become_active_call_count_; | 135 size_t did_become_active_call_count_; |
129 bool has_valid_tile_priorities_; | 136 bool has_valid_tile_priorities_; |
130 bool use_set_valid_tile_priorities_flag_; | 137 bool use_set_valid_tile_priorities_flag_; |
| 138 size_t lost_output_surface_count_; |
131 }; | 139 }; |
132 | 140 |
133 } // namespace cc | 141 } // namespace cc |
134 | 142 |
135 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ | 143 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |