| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 46       int id, | 46       int id, | 
| 47       scoped_refptr<RasterSource> raster_source) { | 47       scoped_refptr<RasterSource> raster_source) { | 
| 48     bool is_mask = true; | 48     bool is_mask = true; | 
| 49     return make_scoped_ptr( | 49     return make_scoped_ptr( | 
| 50         new FakePictureLayerImpl(tree_impl, id, raster_source, is_mask)); | 50         new FakePictureLayerImpl(tree_impl, id, raster_source, is_mask)); | 
| 51   } | 51   } | 
| 52 | 52 | 
| 53   scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 53   scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 
| 54   void PushPropertiesTo(LayerImpl* layer_impl) override; | 54   void PushPropertiesTo(LayerImpl* layer_impl) override; | 
| 55   void AppendQuads(RenderPass* render_pass, | 55   void AppendQuads(RenderPass* render_pass, | 
| 56                    const Occlusion& occlusion_in_content_space, |  | 
| 57                    AppendQuadsData* append_quads_data) override; | 56                    AppendQuadsData* append_quads_data) override; | 
| 58   gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; | 57   gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; | 
| 59 | 58 | 
| 60   void DidBecomeActive() override; | 59   void DidBecomeActive() override; | 
| 61   size_t did_become_active_call_count() { | 60   size_t did_become_active_call_count() { | 
| 62     return did_become_active_call_count_; | 61     return did_become_active_call_count_; | 
| 63   } | 62   } | 
| 64 | 63 | 
| 65   bool HasValidTilePriorities() const override; | 64   bool HasValidTilePriorities() const override; | 
| 66   void set_has_valid_tile_priorities(bool has_valid_priorities) { | 65   void set_has_valid_tile_priorities(bool has_valid_priorities) { | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 106   gfx::Rect visible_rect_for_tile_priority() { | 105   gfx::Rect visible_rect_for_tile_priority() { | 
| 107     return visible_rect_for_tile_priority_; | 106     return visible_rect_for_tile_priority_; | 
| 108   } | 107   } | 
| 109 | 108 | 
| 110   gfx::Rect viewport_rect_for_tile_priority_in_content_space() { | 109   gfx::Rect viewport_rect_for_tile_priority_in_content_space() { | 
| 111     return viewport_rect_for_tile_priority_in_content_space_; | 110     return viewport_rect_for_tile_priority_in_content_space_; | 
| 112   } | 111   } | 
| 113 | 112 | 
| 114   void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; } | 113   void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; } | 
| 115 | 114 | 
|  | 115   void SetIsDrawnRenderSurfaceLayerListMember(bool is); | 
|  | 116 | 
| 116   void CreateAllTiles(); | 117   void CreateAllTiles(); | 
| 117   void SetAllTilesVisible(); | 118   void SetAllTilesVisible(); | 
| 118   void SetAllTilesReady(); | 119   void SetAllTilesReady(); | 
| 119   void SetAllTilesReadyInTiling(PictureLayerTiling* tiling); | 120   void SetAllTilesReadyInTiling(PictureLayerTiling* tiling); | 
| 120   void SetTileReady(Tile* tile); | 121   void SetTileReady(Tile* tile); | 
| 121   void ResetAllTilesPriorities(); | 122   void ResetAllTilesPriorities(); | 
| 122   PictureLayerTilingSet* GetTilings() { return tilings_.get(); } | 123   PictureLayerTilingSet* GetTilings() { return tilings_.get(); } | 
| 123 | 124 | 
| 124   // Add the given tiling as a "used" tiling during AppendQuads. This ensures | 125   // Add the given tiling as a "used" tiling during AppendQuads. This ensures | 
| 125   // that future calls to UpdateTiles don't delete the tiling. | 126   // that future calls to UpdateTiles don't delete the tiling. | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 161   size_t append_quads_count_; | 162   size_t append_quads_count_; | 
| 162   size_t did_become_active_call_count_; | 163   size_t did_become_active_call_count_; | 
| 163   bool has_valid_tile_priorities_; | 164   bool has_valid_tile_priorities_; | 
| 164   bool use_set_valid_tile_priorities_flag_; | 165   bool use_set_valid_tile_priorities_flag_; | 
| 165   size_t release_resources_count_; | 166   size_t release_resources_count_; | 
| 166 }; | 167 }; | 
| 167 | 168 | 
| 168 }  // namespace cc | 169 }  // namespace cc | 
| 169 | 170 | 
| 170 #endif  // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ | 171 #endif  // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ | 
| OLD | NEW | 
|---|