| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_LAYERS_TILED_LAYER_H_ | 5 #ifndef CC_LAYERS_TILED_LAYER_H_ |
| 6 #define CC_LAYERS_TILED_LAYER_H_ | 6 #define CC_LAYERS_TILED_LAYER_H_ |
| 7 | 7 |
| 8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/layers/contents_scaling_layer.h" | 9 #include "cc/layers/contents_scaling_layer.h" |
| 10 #include "cc/resources/layer_tiling_data.h" | 10 #include "cc/resources/layer_tiling_data.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 void ReduceMemoryUsage() override; | 30 void ReduceMemoryUsage() override; |
| 31 void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override; | 31 void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override; |
| 32 void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override; | 32 void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override; |
| 33 void SetTexturePriorities(const PriorityCalculator& priority_calc) override; | 33 void SetTexturePriorities(const PriorityCalculator& priority_calc) override; |
| 34 SimpleEnclosedRegion VisibleContentOpaqueRegion() const override; | 34 SimpleEnclosedRegion VisibleContentOpaqueRegion() const override; |
| 35 bool Update(ResourceUpdateQueue* queue, | 35 bool Update(ResourceUpdateQueue* queue, |
| 36 const OcclusionTracker<Layer>* occlusion) override; | 36 const OcclusionTracker<Layer>* occlusion) override; |
| 37 void OnOutputSurfaceCreated() override; | 37 void OnOutputSurfaceCreated() override; |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 TiledLayer(); | 40 explicit TiledLayer(const LayerSettings& settings); |
| 41 ~TiledLayer() override; | 41 ~TiledLayer() override; |
| 42 | 42 |
| 43 void UpdateTileSizeAndTilingOption(); | 43 void UpdateTileSizeAndTilingOption(); |
| 44 void UpdateBounds(); | 44 void UpdateBounds(); |
| 45 | 45 |
| 46 // Exposed to subclasses for testing. | 46 // Exposed to subclasses for testing. |
| 47 void SetTileSize(const gfx::Size& size); | 47 void SetTileSize(const gfx::Size& size); |
| 48 void SetTextureFormat(ResourceFormat texture_format) { | 48 void SetTextureFormat(ResourceFormat texture_format) { |
| 49 texture_format_ = texture_format; | 49 texture_format_ = texture_format; |
| 50 } | 50 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 TilingOption tiling_option_; | 138 TilingOption tiling_option_; |
| 139 scoped_ptr<LayerTilingData> tiler_; | 139 scoped_ptr<LayerTilingData> tiler_; |
| 140 | 140 |
| 141 DISALLOW_COPY_AND_ASSIGN(TiledLayer); | 141 DISALLOW_COPY_AND_ASSIGN(TiledLayer); |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 } // namespace cc | 144 } // namespace cc |
| 145 | 145 |
| 146 #endif // CC_LAYERS_TILED_LAYER_H_ | 146 #endif // CC_LAYERS_TILED_LAYER_H_ |
| OLD | NEW |