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

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

Issue 1158553004: cc: Cull DrawingDisplayItems outside of the raster playback rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cull: . Created 5 years, 6 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/playback/display_item.h ('k') | cc/playback/display_item_list.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_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 24 matching lines...) Expand all
35 // is used). The resulting display list will not support sidecar data. 35 // is used). The resulting display list will not support sidecar data.
36 static scoped_refptr<DisplayItemList> Create(gfx::Rect layer_rect, 36 static scoped_refptr<DisplayItemList> Create(gfx::Rect layer_rect,
37 bool use_cached_picture); 37 bool use_cached_picture);
38 38
39 static scoped_refptr<DisplayItemList> Create( 39 static scoped_refptr<DisplayItemList> Create(
40 gfx::Rect layer_rect, 40 gfx::Rect layer_rect,
41 const DisplayItemListSettings& settings); 41 const DisplayItemListSettings& settings);
42 42
43 void Raster(SkCanvas* canvas, 43 void Raster(SkCanvas* canvas,
44 SkPicture::AbortCallback* callback, 44 SkPicture::AbortCallback* callback,
45 const gfx::Rect& canvas_target_playback_rect,
45 float contents_scale) const; 46 float contents_scale) const;
46 47
47 template <typename DisplayItemType> 48 template <typename DisplayItemType>
48 DisplayItemType* CreateAndAppendItem() { 49 DisplayItemType* CreateAndAppendItem() {
49 #if DCHECK_IS_ON() 50 #if DCHECK_IS_ON()
50 needs_process_ = true; 51 needs_process_ = true;
51 #endif 52 #endif
52 ProcessAppendedItemsOnTheFly(); 53 ProcessAppendedItemsOnTheFly();
53 return items_.AllocateAndConstruct<DisplayItemType>(); 54 return items_.AllocateAndConstruct<DisplayItemType>();
54 } 55 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 107
107 friend class base::RefCountedThreadSafe<DisplayItemList>; 108 friend class base::RefCountedThreadSafe<DisplayItemList>;
108 friend class PixelRefMap::Iterator; 109 friend class PixelRefMap::Iterator;
109 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, PictureMemoryUsage); 110 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, PictureMemoryUsage);
110 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); 111 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
111 }; 112 };
112 113
113 } // namespace cc 114 } // namespace cc
114 115
115 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ 116 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
OLDNEW
« no previous file with comments | « cc/playback/display_item.h ('k') | cc/playback/display_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698