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

Side by Side Diff: src/core/SkPictureRecorder.cpp

Issue 333823007: Enable basic drawing with SkRecord-based pictures. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ref accel data Created 6 years, 6 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/SkPicture.cpp ('k') | src/gpu/GrPictureUtils.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBBoxHierarchyRecord.h" 8 #include "SkBBoxHierarchyRecord.h"
9 #include "SkPicturePlayback.h" 9 #include "SkPicturePlayback.h"
10 #include "SkPictureRecord.h" 10 #include "SkPictureRecord.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if (NULL != fRecorder.get()) { 53 if (NULL != fRecorder.get()) {
54 return fRecorder.get(); 54 return fRecorder.get();
55 } 55 }
56 return fPictureRecord.get(); 56 return fPictureRecord.get();
57 } 57 }
58 58
59 SkPicture* SkPictureRecorder::endRecording() { 59 SkPicture* SkPictureRecorder::endRecording() {
60 SkPicture* picture = NULL; 60 SkPicture* picture = NULL;
61 61
62 if (NULL != fRecord.get()) { 62 if (NULL != fRecord.get()) {
63 // TODO: picture = SkNEW_ARGS(SkPicture, (fWidth, fHeight, fRecord.detac h())); 63 picture = SkNEW_ARGS(SkPicture, (fWidth, fHeight, fRecord.detach()));
64 } 64 }
65 65
66 if (NULL != fPictureRecord.get()) { 66 if (NULL != fPictureRecord.get()) {
67 fPictureRecord->endRecording(); 67 fPictureRecord->endRecording();
68 const bool deepCopyOps = false; 68 const bool deepCopyOps = false;
69 picture = SkNEW_ARGS(SkPicture, (fWidth, fHeight, *fPictureRecord.get(), deepCopyOps)); 69 picture = SkNEW_ARGS(SkPicture, (fWidth, fHeight, *fPictureRecord.get(), deepCopyOps));
70 } 70 }
71 71
72 return picture; 72 return picture;
73 } 73 }
(...skipping 12 matching lines...) Expand all
86 if (NULL != fRecord.get()) { 86 if (NULL != fRecord.get()) {
87 SkRecordDraw(*fRecord, canvas); 87 SkRecordDraw(*fRecord, canvas);
88 } 88 }
89 89
90 if (NULL != fPictureRecord.get()) { 90 if (NULL != fPictureRecord.get()) {
91 const bool deepCopyOps = true; 91 const bool deepCopyOps = true;
92 SkPicture picture(fWidth, fHeight, *fPictureRecord.get(), deepCopyOps); 92 SkPicture picture(fWidth, fHeight, *fPictureRecord.get(), deepCopyOps);
93 picture.draw(canvas); 93 picture.draw(canvas);
94 } 94 }
95 } 95 }
OLDNEW
« no previous file with comments | « src/core/SkPicture.cpp ('k') | src/gpu/GrPictureUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698