| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 bool is_mask() const { return is_mask_; } | 51 bool is_mask() const { return is_mask_; } |
| 52 | 52 |
| 53 // LayerImpl overrides. | 53 // LayerImpl overrides. |
| 54 const char* LayerTypeAsString() const override; | 54 const char* LayerTypeAsString() const override; |
| 55 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 55 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
| 56 void PushPropertiesTo(LayerImpl* layer) override; | 56 void PushPropertiesTo(LayerImpl* layer) override; |
| 57 void AppendQuads(RenderPass* render_pass, | 57 void AppendQuads(RenderPass* render_pass, |
| 58 const Occlusion& occlusion_in_content_space, | 58 const Occlusion& occlusion_in_content_space, |
| 59 AppendQuadsData* append_quads_data) override; | 59 AppendQuadsData* append_quads_data) override; |
| 60 bool UpdateTiles(const Occlusion& occlusion_in_content_space, | |
| 61 bool resourceless_software_draw) override; | |
| 62 void NotifyTileStateChanged(const Tile* tile) override; | 60 void NotifyTileStateChanged(const Tile* tile) override; |
| 63 void DidBeginTracing() override; | 61 void DidBeginTracing() override; |
| 64 void ReleaseResources() override; | 62 void ReleaseResources() override; |
| 65 void RecreateResources() override; | 63 void RecreateResources() override; |
| 66 skia::RefPtr<SkPicture> GetPicture() override; | 64 skia::RefPtr<SkPicture> GetPicture() override; |
| 67 | 65 |
| 68 // PictureLayerTilingClient overrides. | 66 // PictureLayerTilingClient overrides. |
| 69 scoped_refptr<Tile> CreateTile(float contents_scale, | 67 scoped_refptr<Tile> CreateTile(float contents_scale, |
| 70 const gfx::Rect& content_rect) override; | 68 const gfx::Rect& content_rect) override; |
| 71 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; | 69 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; |
| 72 const Region* GetPendingInvalidation() override; | 70 const Region* GetPendingInvalidation() override; |
| 73 const PictureLayerTiling* GetPendingOrActiveTwinTiling( | 71 const PictureLayerTiling* GetPendingOrActiveTwinTiling( |
| 74 const PictureLayerTiling* tiling) const override; | 72 const PictureLayerTiling* tiling) const override; |
| 75 PictureLayerTiling* GetRecycledTwinTiling( | 73 PictureLayerTiling* GetRecycledTwinTiling( |
| 76 const PictureLayerTiling* tiling) override; | 74 const PictureLayerTiling* tiling) override; |
| 77 TilePriority::PriorityBin GetMaxTilePriorityBin() const override; | 75 TilePriority::PriorityBin GetMaxTilePriorityBin() const override; |
| 78 WhichTree GetTree() const override; | 76 WhichTree GetTree() const override; |
| 79 bool RequiresHighResToDraw() const override; | 77 bool RequiresHighResToDraw() const override; |
| 80 | 78 |
| 81 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source, | 79 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source, |
| 82 Region* new_invalidation, | 80 Region* new_invalidation, |
| 83 const PictureLayerTilingSet* pending_set); | 81 const PictureLayerTilingSet* pending_set); |
| 82 bool UpdateTiles(const Occlusion& occlusion_in_content_space, |
| 83 bool resourceless_software_draw); |
| 84 | 84 |
| 85 // Mask-related functions. | 85 // Mask-related functions. |
| 86 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, | 86 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, |
| 87 gfx::Size* resource_size) const override; | 87 gfx::Size* resource_size) const override; |
| 88 | 88 |
| 89 void SetNearestNeighbor(bool nearest_neighbor); | 89 void SetNearestNeighbor(bool nearest_neighbor); |
| 90 | 90 |
| 91 size_t GPUMemoryUsageInBytes() const override; | 91 size_t GPUMemoryUsageInBytes() const override; |
| 92 | 92 |
| 93 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; | 93 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // of comparing pointers, since objects pointed to are not guaranteed to | 177 // of comparing pointers, since objects pointed to are not guaranteed to |
| 178 // exist. | 178 // exist. |
| 179 std::vector<PictureLayerTiling*> last_append_quads_tilings_; | 179 std::vector<PictureLayerTiling*> last_append_quads_tilings_; |
| 180 | 180 |
| 181 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 181 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 } // namespace cc | 184 } // namespace cc |
| 185 | 185 |
| 186 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 186 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |