| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 protected: | 46 protected: |
| 47 explicit PictureLayer(ContentLayerClient* client); | 47 explicit PictureLayer(ContentLayerClient* client); |
| 48 ~PictureLayer() override; | 48 ~PictureLayer() override; |
| 49 | 49 |
| 50 bool HasDrawableContent() const override; | 50 bool HasDrawableContent() const override; |
| 51 void UpdateCanUseLCDText(); | 51 void UpdateCanUseLCDText(); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 enum LcdTextState { |
| 55 LCD_TEXT_STATE_UNKNOWN, |
| 56 LCD_TEXT_STATE_ALLOWED, |
| 57 LCD_TEXT_STATE_DISALLOWED, |
| 58 }; |
| 59 |
| 54 ContentLayerClient* client_; | 60 ContentLayerClient* client_; |
| 55 scoped_ptr<RecordingSource> recording_source_; | 61 scoped_ptr<RecordingSource> recording_source_; |
| 56 devtools_instrumentation:: | 62 devtools_instrumentation:: |
| 57 ScopedLayerObjectTracker instrumentation_object_tracker_; | 63 ScopedLayerObjectTracker instrumentation_object_tracker_; |
| 58 // Invalidation to use the next time update is called. | 64 // Invalidation to use the next time update is called. |
| 59 InvalidationRegion pending_invalidation_; | 65 InvalidationRegion pending_invalidation_; |
| 60 // Invalidation from the last time update was called. | 66 // Invalidation from the last time update was called. |
| 61 Region recording_invalidation_; | 67 Region recording_invalidation_; |
| 62 gfx::Rect last_updated_visible_content_rect_; | 68 gfx::Rect last_updated_visible_content_rect_; |
| 63 | 69 |
| 64 int update_source_frame_number_; | 70 int update_source_frame_number_; |
| 65 bool can_use_lcd_text_last_frame_; | 71 bool can_use_lcd_text_for_update_; |
| 66 | 72 |
| 67 DISALLOW_COPY_AND_ASSIGN(PictureLayer); | 73 DISALLOW_COPY_AND_ASSIGN(PictureLayer); |
| 68 }; | 74 }; |
| 69 | 75 |
| 70 } // namespace cc | 76 } // namespace cc |
| 71 | 77 |
| 72 #endif // CC_LAYERS_PICTURE_LAYER_H_ | 78 #endif // CC_LAYERS_PICTURE_LAYER_H_ |
| OLD | NEW |