| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_PICTURE_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "cc/base/cc_export.h" | 16 #include "cc/base/cc_export.h" |
| 17 #include "cc/layers/layer.h" | 17 #include "cc/layers/layer.h" |
| 18 #include "cc/layers/layer_impl.h" | 18 #include "cc/layers/layer_impl.h" |
| 19 #include "cc/playback/image_id.h" |
| 19 #include "cc/tiles/picture_layer_tiling.h" | 20 #include "cc/tiles/picture_layer_tiling.h" |
| 20 #include "cc/tiles/picture_layer_tiling_set.h" | 21 #include "cc/tiles/picture_layer_tiling_set.h" |
| 21 #include "cc/tiles/tiling_set_eviction_queue.h" | 22 #include "cc/tiles/tiling_set_eviction_queue.h" |
| 22 | 23 |
| 23 namespace cc { | 24 namespace cc { |
| 24 | 25 |
| 25 struct AppendQuadsData; | 26 struct AppendQuadsData; |
| 26 class MicroBenchmarkImpl; | 27 class MicroBenchmarkImpl; |
| 27 class Tile; | 28 class Tile; |
| 28 | 29 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 PictureLayerImpl* GetPendingOrActiveTwinLayer() const; | 92 PictureLayerImpl* GetPendingOrActiveTwinLayer() const; |
| 92 bool IsOnActiveOrPendingTree() const; | 93 bool IsOnActiveOrPendingTree() const; |
| 93 | 94 |
| 94 // Used for benchmarking | 95 // Used for benchmarking |
| 95 RasterSource* GetRasterSource() const { return raster_source_.get(); } | 96 RasterSource* GetRasterSource() const { return raster_source_.get(); } |
| 96 | 97 |
| 97 void set_is_directly_composited_image(bool is_directly_composited_image) { | 98 void set_is_directly_composited_image(bool is_directly_composited_image) { |
| 98 is_directly_composited_image_ = is_directly_composited_image; | 99 is_directly_composited_image_ = is_directly_composited_image; |
| 99 } | 100 } |
| 100 | 101 |
| 102 void InvalidateRegionForImages(const ImageIdFlatSet& images_to_invalidate); |
| 103 |
| 101 protected: | 104 protected: |
| 102 PictureLayerImpl(LayerTreeImpl* tree_impl, | 105 PictureLayerImpl(LayerTreeImpl* tree_impl, |
| 103 int id, | 106 int id, |
| 104 Layer::LayerMaskType mask_type); | 107 Layer::LayerMaskType mask_type); |
| 105 PictureLayerTiling* AddTiling(float contents_scale); | 108 PictureLayerTiling* AddTiling(float contents_scale); |
| 106 void RemoveAllTilings(); | 109 void RemoveAllTilings(); |
| 107 void AddTilingsForRasterScale(); | 110 void AddTilingsForRasterScale(); |
| 108 void AddLowResolutionTilingIfNeeded(); | 111 void AddLowResolutionTilingIfNeeded(); |
| 109 bool ShouldAdjustRasterScale() const; | 112 bool ShouldAdjustRasterScale() const; |
| 110 void RecalculateRasterScales(); | 113 void RecalculateRasterScales(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // of comparing pointers, since objects pointed to are not guaranteed to | 165 // of comparing pointers, since objects pointed to are not guaranteed to |
| 163 // exist. | 166 // exist. |
| 164 std::vector<PictureLayerTiling*> last_append_quads_tilings_; | 167 std::vector<PictureLayerTiling*> last_append_quads_tilings_; |
| 165 | 168 |
| 166 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 169 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 167 }; | 170 }; |
| 168 | 171 |
| 169 } // namespace cc | 172 } // namespace cc |
| 170 | 173 |
| 171 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 174 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |