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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 123213004: Function pointers -> templates in SkPictureFlat. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: align storage Created 6 years, 12 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 | « src/core/SkPictureFlat.cpp ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicturePlayback.cpp
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 195afc6526a6129a532ab5779635d5f55f886a7c..97e566764b170cde28fb41e9d0bf4820b86bd301 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -212,9 +212,10 @@ SkPicturePlayback::SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInf
SkDEBUGCODE(int heapSize = SafeCount(fBitmapHeap.get());)
for (int i = 0; i < paintCount; i++) {
if (needs_deep_copy(src.fPaints->at(i))) {
- deepCopyInfo->paintData[i] = SkFlatData::Create(&deepCopyInfo->controller,
- &src.fPaints->at(i), 0,
- &SkFlattenObjectProc<SkPaint>);
+ deepCopyInfo->paintData[i] =
+ SkFlatData::Create<SkPaintTraits>(&deepCopyInfo->controller,
+ src.fPaints->at(i), 0);
+
} else {
// this is our sentinel, which we use in the unflatten loop
deepCopyInfo->paintData[i] = NULL;
@@ -233,9 +234,8 @@ SkPicturePlayback::SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInf
SkTypefacePlayback* tfPlayback = deepCopyInfo->controller.getTypefacePlayback();
for (int i = 0; i < paintCount; i++) {
if (deepCopyInfo->paintData[i]) {
- deepCopyInfo->paintData[i]->unflatten(&fPaints->writableAt(i),
- &SkUnflattenObjectProc<SkPaint>,
- bmHeap, tfPlayback);
+ deepCopyInfo->paintData[i]->unflatten<SkPaintTraits>(&fPaints->writableAt(i),
+ bmHeap, tfPlayback);
} else {
// needs_deep_copy was false, so just need to assign
fPaints->writableAt(i) = src.fPaints->at(i);
« no previous file with comments | « src/core/SkPictureFlat.cpp ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698