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

Unified Diff: cc/paint/paint_record.h

Issue 2768143002: Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: Rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: cc/paint/paint_record.h
diff --git a/cc/paint/paint_record.h b/cc/paint/paint_record.h
index 8506606b59f2d7ddfc3ac1a996c6f0cf23067704..daeee0046bf503cec07e36879b58ee9fc53a1154 100644
--- a/cc/paint/paint_record.h
+++ b/cc/paint/paint_record.h
@@ -5,19 +5,22 @@
#ifndef CC_PAINT_PAINT_RECORD_H_
#define CC_PAINT_PAINT_RECORD_H_
+#include "cc/paint/paint_export.h"
+#include "cc/paint/paint_op_buffer.h"
#include "third_party/skia/include/core/SkPicture.h"
namespace cc {
-using PaintRecord = SkPicture;
+// TODO(enne): Don't want to rename the world for this. Using these as the
+// same types for now prevents an extra allocation. Probably PaintRecord
+// will become an interface in the future.
+using PaintRecord = PaintOpBuffer;
-inline sk_sp<SkPicture> ToSkPicture(sk_sp<PaintRecord> record) {
- return record;
-}
+// TODO(enne): Remove these if possible, they are really expensive.
+CC_PAINT_EXPORT sk_sp<SkPicture> ToSkPicture(sk_sp<PaintRecord> record);
-inline sk_sp<const SkPicture> ToSkPicture(sk_sp<const PaintRecord> record) {
- return record;
-}
+CC_PAINT_EXPORT sk_sp<const SkPicture> ToSkPicture(
+ sk_sp<const PaintRecord> record);
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698