Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(545)

Side by Side Diff: cc/playback/display_list_recording_source.h

Issue 1811113004: Store recording invalidations in DisplayListRecordingSource, save them via Update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/playback/display_list_recording_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 } 23 }
23 24
(...skipping 28 matching lines...) Expand all
52 const gfx::Rect& visible_layer_rect, 53 const gfx::Rect& visible_layer_rect,
53 int frame_number, 54 int frame_number,
54 RecordingMode recording_mode); 55 RecordingMode recording_mode);
55 gfx::Size GetSize() const; 56 gfx::Size GetSize() const;
56 void SetEmptyBounds(); 57 void SetEmptyBounds();
57 void SetSlowdownRasterScaleFactor(int factor); 58 void SetSlowdownRasterScaleFactor(int factor);
58 void SetGenerateDiscardableImagesMetadata(bool generate_metadata); 59 void SetGenerateDiscardableImagesMetadata(bool generate_metadata);
59 void SetBackgroundColor(SkColor background_color); 60 void SetBackgroundColor(SkColor background_color);
60 void SetRequiresClear(bool requires_clear); 61 void SetRequiresClear(bool requires_clear);
61 62
63 void SetNeedsDisplayRect(const gfx::Rect& layer_rect);
64
62 // These functions are virtual for testing. 65 // These functions are virtual for testing.
63 virtual scoped_refptr<DisplayListRasterSource> CreateRasterSource( 66 virtual scoped_refptr<DisplayListRasterSource> CreateRasterSource(
64 bool can_use_lcd_text) const; 67 bool can_use_lcd_text) const;
65 virtual bool IsSuitableForGpuRasterization() const; 68 virtual bool IsSuitableForGpuRasterization() const;
66 69
67 gfx::Rect recorded_viewport() const { return recorded_viewport_; } 70 gfx::Rect recorded_viewport() const { return recorded_viewport_; }
68 71
69 protected: 72 protected:
70 void Clear(); 73 void Clear();
71 74
(...skipping 13 matching lines...) Expand all
85 private: 88 private:
86 void UpdateInvalidationForNewViewport(const gfx::Rect& old_recorded_viewport, 89 void UpdateInvalidationForNewViewport(const gfx::Rect& old_recorded_viewport,
87 const gfx::Rect& new_recorded_viewport, 90 const gfx::Rect& new_recorded_viewport,
88 Region* invalidation); 91 Region* invalidation);
89 void FinishDisplayItemListUpdate(); 92 void FinishDisplayItemListUpdate();
90 93
91 friend class DisplayListRasterSource; 94 friend class DisplayListRasterSource;
92 95
93 void DetermineIfSolidColor(); 96 void DetermineIfSolidColor();
94 97
98 InvalidationRegion invalidation_;
99
95 DISALLOW_COPY_AND_ASSIGN(DisplayListRecordingSource); 100 DISALLOW_COPY_AND_ASSIGN(DisplayListRecordingSource);
96 }; 101 };
97 102
98 } // namespace cc 103 } // namespace cc
99 104
100 #endif // CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ 105 #endif // CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/playback/display_list_recording_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698