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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/display_item_list.h
diff --git a/cc/resources/display_item_list.h b/cc/resources/display_item_list.h
new file mode 100644
index 0000000000000000000000000000000000000000..10d052f5fa1ac575b0dcdc3819b699d9dd5aeec6
--- /dev/null
+++ b/cc/resources/display_item_list.h
@@ -0,0 +1,53 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_RESOURCES_DISPLAY_ITEM_LIST_H_
+#define CC_RESOURCES_DISPLAY_ITEM_LIST_H_
+
+#include "base/debug/trace_event.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "cc/base/cc_export.h"
+#include "cc/base/scoped_ptr_vector.h"
+#include "cc/resources/display_item.h"
+#include "ui/gfx/rect.h"
+
+class SkCanvas;
+class SkDrawPictureCallback;
+
+namespace cc {
+
+class CC_EXPORT DisplayItemList
+ : public base::RefCountedThreadSafe<DisplayItemList> {
+ public:
+ static scoped_refptr<DisplayItemList> Create();
+
+ void Raster(SkCanvas* canvas,
+ SkDrawPictureCallback* callback,
+ float contents_scale) const;
+
+ void AppendItem(scoped_ptr<DisplayItem> item);
+
+ bool IsSuitableForGpuRasterization() const;
+ int ApproximateOpCount() const;
+ size_t PictureMemoryUsage() const;
+
+ scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const;
+
+ void EmitTraceSnapshot() const;
+
+ private:
+ DisplayItemList();
+ ~DisplayItemList();
+ ScopedPtrVector<DisplayItem> items_;
+ bool is_suitable_for_gpu_rasterization_;
+ int approximate_op_count_;
+
+ friend class base::RefCountedThreadSafe<DisplayItemList>;
+ DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_DISPLAY_ITEM_LIST_H_
« 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