| 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" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 explicit PictureLayer(ContentLayerClient* client); | 67 explicit PictureLayer(ContentLayerClient* client); |
| 68 // Allow tests to inject a recording source. | 68 // Allow tests to inject a recording source. |
| 69 PictureLayer(ContentLayerClient* client, | 69 PictureLayer(ContentLayerClient* client, |
| 70 std::unique_ptr<RecordingSource> source); | 70 std::unique_ptr<RecordingSource> source); |
| 71 ~PictureLayer() override; | 71 ~PictureLayer() override; |
| 72 | 72 |
| 73 bool HasDrawableContent() const override; | 73 bool HasDrawableContent() const override; |
| 74 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; | 74 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; |
| 75 void LayerSpecificPropertiesToProto(proto::LayerProperties* proto) override; | 75 void LayerSpecificPropertiesToProto(proto::LayerProperties* proto, |
| 76 bool inputs_only) override; |
| 76 void FromLayerSpecificPropertiesProto( | 77 void FromLayerSpecificPropertiesProto( |
| 77 const proto::LayerProperties& proto) override; | 78 const proto::LayerProperties& proto) override; |
| 78 | 79 |
| 79 bool is_mask() const { return is_mask_; } | 80 bool is_mask() const { return is_mask_; } |
| 80 | 81 |
| 81 PictureLayerInputs picture_layer_inputs_; | 82 PictureLayerInputs picture_layer_inputs_; |
| 82 | 83 |
| 83 private: | 84 private: |
| 84 friend class TestSerializationPictureLayer; | 85 friend class TestSerializationPictureLayer; |
| 85 | 86 |
| 86 void DropRecordingSourceContentIfInvalid(); | 87 void DropRecordingSourceContentIfInvalid(); |
| 87 | 88 |
| 88 std::unique_ptr<RecordingSource> recording_source_; | 89 std::unique_ptr<RecordingSource> recording_source_; |
| 89 devtools_instrumentation:: | 90 devtools_instrumentation:: |
| 90 ScopedLayerObjectTracker instrumentation_object_tracker_; | 91 ScopedLayerObjectTracker instrumentation_object_tracker_; |
| 91 | 92 |
| 92 Region last_updated_invalidation_; | 93 Region last_updated_invalidation_; |
| 93 | 94 |
| 94 int update_source_frame_number_; | 95 int update_source_frame_number_; |
| 95 bool is_mask_; | 96 bool is_mask_; |
| 96 | 97 |
| 97 DISALLOW_COPY_AND_ASSIGN(PictureLayer); | 98 DISALLOW_COPY_AND_ASSIGN(PictureLayer); |
| 98 }; | 99 }; |
| 99 | 100 |
| 100 } // namespace cc | 101 } // namespace cc |
| 101 | 102 |
| 102 #endif // CC_LAYERS_PICTURE_LAYER_H_ | 103 #endif // CC_LAYERS_PICTURE_LAYER_H_ |
| OLD | NEW |