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