Chromium Code Reviews| 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_H_ | 5 #ifndef CC_LAYERS_PICTURE_LAYER_H_ |
| 6 #define CC_LAYERS_PICTURE_LAYER_H_ | 6 #define CC_LAYERS_PICTURE_LAYER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/base/invalidation_region.h" | 9 #include "cc/base/invalidation_region.h" |
| 10 #include "cc/debug/devtools_instrumentation.h" | 10 #include "cc/debug/devtools_instrumentation.h" |
| 11 #include "cc/debug/micro_benchmark_controller.h" | 11 #include "cc/debug/micro_benchmark_controller.h" |
| 12 #include "cc/layers/layer.h" | 12 #include "cc/layers/layer.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 | 15 |
| 16 namespace proto { | |
| 17 class PictureLayerProperties; | |
| 18 } | |
| 19 | |
| 16 class ContentLayerClient; | 20 class ContentLayerClient; |
| 21 class DisplayItemList; | |
| 17 class RecordingSource; | 22 class RecordingSource; |
| 18 class ResourceUpdateQueue; | 23 class ResourceUpdateQueue; |
| 19 | 24 |
| 20 class CC_EXPORT PictureLayer : public Layer { | 25 class CC_EXPORT PictureLayer : public Layer { |
| 21 public: | 26 public: |
| 22 static scoped_refptr<PictureLayer> Create(ContentLayerClient* client); | 27 static scoped_refptr<PictureLayer> Create(ContentLayerClient* client); |
| 23 | 28 |
| 24 void ClearClient(); | 29 void ClearClient(); |
| 25 | 30 |
| 26 void SetNearestNeighbor(bool nearest_neighbor); | 31 void SetNearestNeighbor(bool nearest_neighbor); |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 51 ~PictureLayer() override; | 56 ~PictureLayer() override; |
| 52 | 57 |
| 53 bool HasDrawableContent() const override; | 58 bool HasDrawableContent() const override; |
| 54 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; | 59 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; |
| 55 void LayerSpecificPropertiesToProto(proto::LayerProperties* proto) override; | 60 void LayerSpecificPropertiesToProto(proto::LayerProperties* proto) override; |
| 56 void FromLayerSpecificPropertiesProto( | 61 void FromLayerSpecificPropertiesProto( |
| 57 const proto::LayerProperties& proto) override; | 62 const proto::LayerProperties& proto) override; |
| 58 | 63 |
| 59 bool is_mask() const { return is_mask_; } | 64 bool is_mask() const { return is_mask_; } |
| 60 | 65 |
| 66 // Encapsulates all data, callbacks or interfaces received from the embedder. | |
| 67 struct Inputs { | |
|
vmpstr
2016/07/25 20:29:14
types should be defined at the beginning of the ac
Menglin
2016/07/25 21:58:52
Done.
| |
| 68 Inputs(); | |
| 69 ~Inputs(); | |
| 70 | |
| 71 ContentLayerClient* client = nullptr; | |
| 72 bool nearest_neighbor = false; | |
| 73 gfx::Rect recorded_viewport; | |
| 74 scoped_refptr<DisplayItemList> display_list; | |
| 75 size_t painter_reported_memory_usage = 0; | |
| 76 }; | |
| 77 | |
| 78 Inputs inputs_; | |
| 79 | |
| 61 private: | 80 private: |
| 62 friend class TestSerializationPictureLayer; | 81 friend class TestSerializationPictureLayer; |
| 63 | 82 |
| 64 void DropRecordingSourceContentIfInvalid(); | 83 void DropRecordingSourceContentIfInvalid(); |
| 65 | 84 |
| 66 std::unique_ptr<RecordingSource> recording_source_; | 85 std::unique_ptr<RecordingSource> recording_source_; |
| 67 devtools_instrumentation:: | 86 devtools_instrumentation:: |
| 68 ScopedLayerObjectTracker instrumentation_object_tracker_; | 87 ScopedLayerObjectTracker instrumentation_object_tracker_; |
| 69 | 88 |
| 70 Region last_updated_invalidation_; | 89 Region last_updated_invalidation_; |
| 71 | 90 |
| 72 int update_source_frame_number_; | 91 int update_source_frame_number_; |
| 73 bool is_mask_; | 92 bool is_mask_; |
| 74 | 93 |
| 75 // Encapsulates all data, callbacks or interfaces received from the embedder. | |
| 76 struct Inputs { | |
| 77 ContentLayerClient* client = nullptr; | |
| 78 bool nearest_neighbor = false; | |
| 79 }; | |
| 80 | |
| 81 Inputs inputs_; | |
| 82 | |
| 83 DISALLOW_COPY_AND_ASSIGN(PictureLayer); | 94 DISALLOW_COPY_AND_ASSIGN(PictureLayer); |
| 84 }; | 95 }; |
| 85 | 96 |
| 86 } // namespace cc | 97 } // namespace cc |
| 87 | 98 |
| 88 #endif // CC_LAYERS_PICTURE_LAYER_H_ | 99 #endif // CC_LAYERS_PICTURE_LAYER_H_ |
| OLD | NEW |