| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ | 5 #ifndef CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ |
| 6 #define CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ | 6 #define CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
| 14 #include "cc/base/invalidation_region.h" |
| 14 #include "third_party/skia/include/core/SkColor.h" | 15 #include "third_party/skia/include/core/SkColor.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
| 16 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
| 17 | 18 |
| 18 namespace cc { | 19 namespace cc { |
| 19 | 20 |
| 20 namespace proto { | 21 namespace proto { |
| 21 class DisplayListRecordingSource; | 22 class DisplayListRecordingSource; |
| 22 } // namespace proto | 23 } // namespace proto |
| 23 | 24 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 const gfx::Rect& visible_layer_rect, | 57 const gfx::Rect& visible_layer_rect, |
| 57 int frame_number, | 58 int frame_number, |
| 58 RecordingMode recording_mode); | 59 RecordingMode recording_mode); |
| 59 gfx::Size GetSize() const; | 60 gfx::Size GetSize() const; |
| 60 void SetEmptyBounds(); | 61 void SetEmptyBounds(); |
| 61 void SetSlowdownRasterScaleFactor(int factor); | 62 void SetSlowdownRasterScaleFactor(int factor); |
| 62 void SetGenerateDiscardableImagesMetadata(bool generate_metadata); | 63 void SetGenerateDiscardableImagesMetadata(bool generate_metadata); |
| 63 void SetBackgroundColor(SkColor background_color); | 64 void SetBackgroundColor(SkColor background_color); |
| 64 void SetRequiresClear(bool requires_clear); | 65 void SetRequiresClear(bool requires_clear); |
| 65 | 66 |
| 67 void SetNeedsDisplayRect(const gfx::Rect& layer_rect); |
| 68 |
| 66 // These functions are virtual for testing. | 69 // These functions are virtual for testing. |
| 67 virtual scoped_refptr<DisplayListRasterSource> CreateRasterSource( | 70 virtual scoped_refptr<DisplayListRasterSource> CreateRasterSource( |
| 68 bool can_use_lcd_text) const; | 71 bool can_use_lcd_text) const; |
| 69 virtual bool IsSuitableForGpuRasterization() const; | 72 virtual bool IsSuitableForGpuRasterization() const; |
| 70 | 73 |
| 71 gfx::Rect recorded_viewport() const { return recorded_viewport_; } | 74 gfx::Rect recorded_viewport() const { return recorded_viewport_; } |
| 72 | 75 |
| 73 protected: | 76 protected: |
| 74 void Clear(); | 77 void Clear(); |
| 75 | 78 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 89 private: | 92 private: |
| 90 void UpdateInvalidationForNewViewport(const gfx::Rect& old_recorded_viewport, | 93 void UpdateInvalidationForNewViewport(const gfx::Rect& old_recorded_viewport, |
| 91 const gfx::Rect& new_recorded_viewport, | 94 const gfx::Rect& new_recorded_viewport, |
| 92 Region* invalidation); | 95 Region* invalidation); |
| 93 void FinishDisplayItemListUpdate(); | 96 void FinishDisplayItemListUpdate(); |
| 94 | 97 |
| 95 friend class DisplayListRasterSource; | 98 friend class DisplayListRasterSource; |
| 96 | 99 |
| 97 void DetermineIfSolidColor(); | 100 void DetermineIfSolidColor(); |
| 98 | 101 |
| 102 InvalidationRegion invalidation_; |
| 103 |
| 99 DISALLOW_COPY_AND_ASSIGN(DisplayListRecordingSource); | 104 DISALLOW_COPY_AND_ASSIGN(DisplayListRecordingSource); |
| 100 }; | 105 }; |
| 101 | 106 |
| 102 } // namespace cc | 107 } // namespace cc |
| 103 | 108 |
| 104 #endif // CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ | 109 #endif // CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ |
| OLD | NEW |