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

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

Issue 1349913002: Cache gpu suitability in DisplayItemList, remove SetUnsuitable...ForTesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update LayerTreeHostTestGpuRasterizationDefault Created 5 years, 3 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
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 "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 bool needs_process_; 93 bool needs_process_;
94 #else 94 #else
95 bool ProcessAppendedItemsCalled() const { return true; } 95 bool ProcessAppendedItemsCalled() const { return true; }
96 #endif 96 #endif
97 97
98 ListContainer<DisplayItem> items_; 98 ListContainer<DisplayItem> items_;
99 skia::RefPtr<SkPicture> picture_; 99 skia::RefPtr<SkPicture> picture_;
100 100
101 scoped_ptr<SkPictureRecorder> recorder_; 101 scoped_ptr<SkPictureRecorder> recorder_;
102 skia::RefPtr<SkCanvas> canvas_; 102 skia::RefPtr<SkCanvas> canvas_;
103 bool use_cached_picture_; 103 const bool use_cached_picture_;
104 bool retain_individual_display_items_; 104 bool retain_individual_display_items_;
105 105
106 gfx::Rect layer_rect_; 106 gfx::Rect layer_rect_;
107 bool all_items_are_suitable_for_gpu_rasterization_; 107 bool is_suitable_for_gpu_rasterization_;
108 int approximate_op_count_; 108 int approximate_op_count_;
109 109
110 // Memory usage due to the cached SkPicture. 110 // Memory usage due to the cached SkPicture.
111 size_t picture_memory_usage_; 111 size_t picture_memory_usage_;
112 112
113 // Memory usage due to external data held by display items. 113 // Memory usage due to external data held by display items.
114 size_t external_memory_usage_; 114 size_t external_memory_usage_;
115 115
116 scoped_ptr<DiscardableImageMap> images_; 116 scoped_ptr<DiscardableImageMap> images_;
117 117
118 friend class base::RefCountedThreadSafe<DisplayItemList>; 118 friend class base::RefCountedThreadSafe<DisplayItemList>;
119 friend class DiscardableImageMap::Iterator; 119 friend class DiscardableImageMap::Iterator;
120 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); 120 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage);
121 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); 121 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
122 }; 122 };
123 123
124 } // namespace cc 124 } // namespace cc
125 125
126 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ 126 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698