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

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

Issue 2702633002: color: Remove implied color space (Closed)
Patch Set: Rebase Created 3 years, 10 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/blink/web_display_item_list_impl.cc ('k') | cc/playback/raster_source.h » ('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_ITEM_LIST_H_ 5 #ifndef CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
6 #define CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ 6 #define CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 // Called after all items are appended, to process the items and, if 120 // Called after all items are appended, to process the items and, if
121 // applicable, create an internally cached SkPicture. 121 // applicable, create an internally cached SkPicture.
122 void Finalize(); 122 void Finalize();
123 123
124 void SetIsSuitableForGpuRasterization(bool is_suitable) { 124 void SetIsSuitableForGpuRasterization(bool is_suitable) {
125 inputs_.all_items_are_suitable_for_gpu_rasterization = is_suitable; 125 inputs_.all_items_are_suitable_for_gpu_rasterization = is_suitable;
126 } 126 }
127 bool IsSuitableForGpuRasterization() const; 127 bool IsSuitableForGpuRasterization() const;
128 128
129 void SetImpliedColorSpace(const gfx::ColorSpace& implied_color_space) {
130 inputs_.implied_color_space_specified = true;
131 inputs_.implied_color_space = implied_color_space;
132 }
133 bool HasImpliedColorSpace() const {
134 return inputs_.implied_color_space_specified;
135 }
136 const gfx::ColorSpace& GetImpliedColorSpace() const {
137 return inputs_.implied_color_space;
138 }
139
140 int ApproximateOpCount() const; 129 int ApproximateOpCount() const;
141 size_t ApproximateMemoryUsage() const; 130 size_t ApproximateMemoryUsage() const;
142 bool ShouldBeAnalyzedForSolidColor() const; 131 bool ShouldBeAnalyzedForSolidColor() const;
143 132
144 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue( 133 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue(
145 bool include_items) const; 134 bool include_items) const;
146 135
147 void EmitTraceSnapshot() const; 136 void EmitTraceSnapshot() const;
148 137
149 void GenerateDiscardableImagesMetadata(); 138 void GenerateDiscardableImagesMetadata();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 189
201 ContiguousContainer<DisplayItem> items; 190 ContiguousContainer<DisplayItem> items;
202 // The visual rects associated with each of the display items in the 191 // The visual rects associated with each of the display items in the
203 // display item list. There is one rect per display item, and the 192 // display item list. There is one rect per display item, and the
204 // position in |visual_rects| matches the position of the item in 193 // position in |visual_rects| matches the position of the item in
205 // |items| . These rects are intentionally kept separate 194 // |items| . These rects are intentionally kept separate
206 // because they are not needed while walking the |items| for raster. 195 // because they are not needed while walking the |items| for raster.
207 std::vector<gfx::Rect> visual_rects; 196 std::vector<gfx::Rect> visual_rects;
208 std::vector<size_t> begin_item_indices; 197 std::vector<size_t> begin_item_indices;
209 bool all_items_are_suitable_for_gpu_rasterization = true; 198 bool all_items_are_suitable_for_gpu_rasterization = true;
210 bool implied_color_space_specified = false;
211 gfx::ColorSpace implied_color_space;
212 }; 199 };
213 200
214 Inputs inputs_; 201 Inputs inputs_;
215 202
216 friend class base::RefCountedThreadSafe<DisplayItemList>; 203 friend class base::RefCountedThreadSafe<DisplayItemList>;
217 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); 204 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage);
218 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); 205 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
219 }; 206 };
220 207
221 } // namespace cc 208 } // namespace cc
222 209
223 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ 210 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
OLDNEW
« no previous file with comments | « cc/blink/web_display_item_list_impl.cc ('k') | cc/playback/raster_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698