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 "cc/base/invalidation_region.h" | 8 #include "cc/base/invalidation_region.h" |
9 #include "cc/debug/devtools_instrumentation.h" | 9 #include "cc/debug/devtools_instrumentation.h" |
10 #include "cc/debug/micro_benchmark_controller.h" | 10 #include "cc/debug/micro_benchmark_controller.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 | 45 |
46 protected: | 46 protected: |
47 PictureLayer(const LayerSettings& settings, ContentLayerClient* client); | 47 PictureLayer(const LayerSettings& settings, ContentLayerClient* client); |
48 // Allow tests to inject a recording source. | 48 // Allow tests to inject a recording source. |
49 PictureLayer(const LayerSettings& settings, | 49 PictureLayer(const LayerSettings& settings, |
50 ContentLayerClient* client, | 50 ContentLayerClient* client, |
51 scoped_ptr<DisplayListRecordingSource> source); | 51 scoped_ptr<DisplayListRecordingSource> source); |
52 ~PictureLayer() override; | 52 ~PictureLayer() override; |
53 | 53 |
54 bool HasDrawableContent() const override; | 54 bool HasDrawableContent() const override; |
55 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; | |
David Trainor- moved to gerrit
2015/12/16 19:10:59
Forgot this... added unit tests to check this too.
| |
56 void LayerSpecificPropertiesToProto(proto::LayerProperties* proto) override; | |
57 void FromLayerSpecificPropertiesProto( | |
58 const proto::LayerProperties& proto) override; | |
55 | 59 |
56 bool is_mask() const { return is_mask_; } | 60 bool is_mask() const { return is_mask_; } |
57 | 61 |
58 private: | 62 private: |
63 friend class TestSerializationPictureLayer; | |
64 | |
65 void DropRecordingSourceContentIfInvalid(); | |
66 | |
59 ContentLayerClient* client_; | 67 ContentLayerClient* client_; |
60 scoped_ptr<DisplayListRecordingSource> recording_source_; | 68 scoped_ptr<DisplayListRecordingSource> recording_source_; |
61 devtools_instrumentation:: | 69 devtools_instrumentation:: |
62 ScopedLayerObjectTracker instrumentation_object_tracker_; | 70 ScopedLayerObjectTracker instrumentation_object_tracker_; |
63 | 71 |
64 // Invalidation to use the next time update is called. | 72 // Invalidation to use the next time update is called. |
65 InvalidationRegion invalidation_; | 73 InvalidationRegion invalidation_; |
66 | 74 |
67 gfx::Rect last_updated_visible_layer_rect_; | 75 gfx::Rect last_updated_visible_layer_rect_; |
68 | 76 |
69 int update_source_frame_number_; | 77 int update_source_frame_number_; |
70 bool is_mask_; | 78 bool is_mask_; |
71 bool nearest_neighbor_; | 79 bool nearest_neighbor_; |
72 | 80 |
73 DISALLOW_COPY_AND_ASSIGN(PictureLayer); | 81 DISALLOW_COPY_AND_ASSIGN(PictureLayer); |
74 }; | 82 }; |
75 | 83 |
76 } // namespace cc | 84 } // namespace cc |
77 | 85 |
78 #endif // CC_LAYERS_PICTURE_LAYER_H_ | 86 #endif // CC_LAYERS_PICTURE_LAYER_H_ |
OLD | NEW |