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

Side by Side Diff: src/core/SkRecordedDrawable.h

Issue 1923393002: Revert of Enable flattening of SkRecordedDrawable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « src/core/SkPictureRecorder.cpp ('k') | src/core/SkRecordedDrawable.cpp » ('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 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkBBoxHierarchy.h"
9 #include "SkDrawable.h"
10 #include "SkRecord.h"
11 #include "SkRecorder.h"
12
13 class SkRecordedDrawable : public SkDrawable {
14 public:
15 SkRecordedDrawable(SkRecord* record, SkBBoxHierarchy* bbh, SkDrawableList* d rawableList,
16 const SkRect& bounds, bool doSaveLayerInfo)
17 : fRecord(SkRef(record))
18 , fBBH(SkSafeRef(bbh))
19 , fDrawableList(drawableList) // we take ownership
20 , fBounds(bounds)
21 , fDoSaveLayerInfo(doSaveLayerInfo)
22 {}
23
24 void flatten(SkWriteBuffer& buffer) const override;
25
26 static sk_sp<SkFlattenable> CreateProc(SkReadBuffer& buffer);
27
28 Factory getFactory() const override { return CreateProc; }
29
30 protected:
31 SkRect onGetBounds() override { return fBounds; }
32
33 void onDraw(SkCanvas* canvas) override;
34
35 SkPicture* onNewPictureSnapshot() override;
36
37 private:
38 SkAutoTUnref<SkRecord> fRecord;
39 SkAutoTUnref<SkBBoxHierarchy> fBBH;
40 SkAutoTDelete<SkDrawableList> fDrawableList;
41 const SkRect fBounds;
42 const bool fDoSaveLayerInfo;
43 };
OLDNEW
« no previous file with comments | « src/core/SkPictureRecorder.cpp ('k') | src/core/SkRecordedDrawable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698