| 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 28 matching lines...) Expand all Loading... |
| 39 virtual void OnOutputSurfaceCreated() OVERRIDE; | 39 virtual void OnOutputSurfaceCreated() OVERRIDE; |
| 40 | 40 |
| 41 protected: | 41 protected: |
| 42 TiledLayer(); | 42 TiledLayer(); |
| 43 virtual ~TiledLayer(); | 43 virtual ~TiledLayer(); |
| 44 | 44 |
| 45 void UpdateTileSizeAndTilingOption(); | 45 void UpdateTileSizeAndTilingOption(); |
| 46 void UpdateBounds(); | 46 void UpdateBounds(); |
| 47 | 47 |
| 48 // Exposed to subclasses for testing. | 48 // Exposed to subclasses for testing. |
| 49 void SetTileSize(gfx::Size size); | 49 void SetTileSize(const gfx::Size& size); |
| 50 void SetTextureFormat(ResourceFormat texture_format) { | 50 void SetTextureFormat(ResourceFormat texture_format) { |
| 51 texture_format_ = texture_format; | 51 texture_format_ = texture_format; |
| 52 } | 52 } |
| 53 void SetBorderTexelOption(LayerTilingData::BorderTexelOption option); | 53 void SetBorderTexelOption(LayerTilingData::BorderTexelOption option); |
| 54 size_t NumPaintedTiles() { return tiler_->tiles().size(); } | 54 size_t NumPaintedTiles() { return tiler_->tiles().size(); } |
| 55 | 55 |
| 56 virtual LayerUpdater* Updater() const = 0; | 56 virtual LayerUpdater* Updater() const = 0; |
| 57 virtual void CreateUpdaterIfNeeded() = 0; | 57 virtual void CreateUpdaterIfNeeded() = 0; |
| 58 | 58 |
| 59 // Set invalidations to be potentially repainted during Update(). | 59 // Set invalidations to be potentially repainted during Update(). |
| (...skipping 77 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 |