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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/resources/display_item.cc ('k') | cc/resources/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_RESOURCES_DISPLAY_ITEM_LIST_H_
6 #define CC_RESOURCES_DISPLAY_ITEM_LIST_H_
7
8 #include "base/debug/trace_event.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "cc/base/cc_export.h"
12 #include "cc/base/scoped_ptr_vector.h"
13 #include "cc/resources/display_item.h"
14 #include "ui/gfx/rect.h"
15
16 class SkCanvas;
17 class SkDrawPictureCallback;
18
19 namespace cc {
20
21 class CC_EXPORT DisplayItemList
22 : public base::RefCountedThreadSafe<DisplayItemList> {
23 public:
24 static scoped_refptr<DisplayItemList> Create();
25
26 void Raster(SkCanvas* canvas,
27 SkDrawPictureCallback* callback,
28 float contents_scale) const;
29
30 void AppendItem(scoped_ptr<DisplayItem> item);
31
32 bool IsSuitableForGpuRasterization() const;
33 int ApproximateOpCount() const;
34 size_t PictureMemoryUsage() const;
35
36 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const;
37
38 void EmitTraceSnapshot() const;
39
40 private:
41 DisplayItemList();
42 ~DisplayItemList();
43 ScopedPtrVector<DisplayItem> items_;
44 bool is_suitable_for_gpu_rasterization_;
45 int approximate_op_count_;
46
47 friend class base::RefCountedThreadSafe<DisplayItemList>;
48 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
49 };
50
51 } // namespace cc
52
53 #endif // CC_RESOURCES_DISPLAY_ITEM_LIST_H_
OLDNEW
« no previous file with comments | « cc/resources/display_item.cc ('k') | cc/resources/display_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698