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

Unified Diff: cc/paint/paint_record.h

Issue 2739533003: Revert of Make cc/paint have concrete types (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « cc/paint/paint_flags.h ('k') | cc/paint/paint_record.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/paint/paint_record.h
diff --git a/cc/paint/paint_record.h b/cc/paint/paint_record.h
index d07541ff78c0e581df72d9abde18069c7224170c..a376394cc84e9e79eefe16a0b04a37abd2c216c7 100644
--- a/cc/paint/paint_record.h
+++ b/cc/paint/paint_record.h
@@ -5,54 +5,27 @@
#ifndef CC_PAINT_PAINT_RECORD_H_
#define CC_PAINT_PAINT_RECORD_H_
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "cc/paint/paint_export.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "third_party/skia/include/utils/SkPictureUtils.h"
namespace cc {
-class PaintCanvas;
+using PaintRecord = SkPicture;
-// This class is only used by casting from an SkPicture in PaintRecorder.
-// This will be replaced with its own functionality in a future patch.
-class CC_PAINT_EXPORT PaintRecord : private SkPicture {
- public:
- void playback(PaintCanvas* canvas);
-
- using SkPicture::playback;
- using SkPicture::approximateBytesUsed;
- using SkPicture::approximateOpCount;
- using SkPicture::cullRect;
- using SkRefCnt::ref;
- using SkRefCnt::unref;
-
- private:
- friend class PaintRecorder;
- friend const SkPicture* ToSkPicture(const PaintRecord* record);
- friend SkPicture* ToSkPicture(PaintRecord* record);
- friend sk_sp<SkPicture> ToSkPicture(sk_sp<PaintRecord> record);
- friend sk_sp<const SkPicture> ToSkPicture(sk_sp<const PaintRecord> record);
-
- DISALLOW_COPY_AND_ASSIGN(PaintRecord);
-};
-
-ALWAYS_INLINE const SkPicture* ToSkPicture(const PaintRecord* record) {
- return static_cast<const SkPicture*>(record);
+inline const SkPicture* ToSkPicture(const PaintRecord* record) {
+ return record;
}
-ALWAYS_INLINE SkPicture* ToSkPicture(PaintRecord* record) {
- return static_cast<SkPicture*>(record);
+inline SkPicture* ToSkPicture(PaintRecord* record) {
+ return record;
}
-ALWAYS_INLINE sk_sp<SkPicture> ToSkPicture(sk_sp<PaintRecord> record) {
- return sk_ref_sp(ToSkPicture(record.get()));
+inline sk_sp<SkPicture> ToSkPicture(sk_sp<PaintRecord> record) {
+ return record;
}
-ALWAYS_INLINE sk_sp<const SkPicture> ToSkPicture(
- sk_sp<const PaintRecord> record) {
- return sk_ref_sp(ToSkPicture(record.get()));
+inline sk_sp<const SkPicture> ToSkPicture(sk_sp<const PaintRecord> record) {
+ return record;
}
} // namespace cc
« no previous file with comments | « cc/paint/paint_flags.h ('k') | cc/paint/paint_record.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698