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

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

Issue 769953002: Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/SkLocalMatrixShader.cpp ('k') | src/core/SkPictureShader.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkPathEffect.h" 9 #include "SkPathEffect.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 /* 44 /*
45 Format: [oe0-factory][pe1-factory][pe0-size][pe0-data][pe1-data] 45 Format: [oe0-factory][pe1-factory][pe0-size][pe0-data][pe1-data]
46 */ 46 */
47 void SkPairPathEffect::flatten(SkWriteBuffer& buffer) const { 47 void SkPairPathEffect::flatten(SkWriteBuffer& buffer) const {
48 buffer.writeFlattenable(fPE0); 48 buffer.writeFlattenable(fPE0);
49 buffer.writeFlattenable(fPE1); 49 buffer.writeFlattenable(fPE1);
50 } 50 }
51 51
52 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
53 SkPairPathEffect::SkPairPathEffect(SkReadBuffer& buffer) {
54 fPE0 = buffer.readPathEffect();
55 fPE1 = buffer.readPathEffect();
56 // either of these may fail, so we have to check for nulls later on
57 }
58 #endif
59
60 /////////////////////////////////////////////////////////////////////////////// 52 ///////////////////////////////////////////////////////////////////////////////
61 53
62 SkFlattenable* SkComposePathEffect::CreateProc(SkReadBuffer& buffer) { 54 SkFlattenable* SkComposePathEffect::CreateProc(SkReadBuffer& buffer) {
63 SkAutoTUnref<SkPathEffect> pe0(buffer.readPathEffect()); 55 SkAutoTUnref<SkPathEffect> pe0(buffer.readPathEffect());
64 SkAutoTUnref<SkPathEffect> pe1(buffer.readPathEffect()); 56 SkAutoTUnref<SkPathEffect> pe1(buffer.readPathEffect());
65 return SkComposePathEffect::Create(pe0, pe1); 57 return SkComposePathEffect::Create(pe0, pe1);
66 } 58 }
67 59
68 bool SkComposePathEffect::filterPath(SkPath* dst, const SkPath& src, 60 bool SkComposePathEffect::filterPath(SkPath* dst, const SkPath& src,
69 SkStrokeRec* rec, const SkRect* cullRect) const { 61 SkStrokeRec* rec, const SkRect* cullRect) const {
(...skipping 18 matching lines...) Expand all
88 SkAutoTUnref<SkPathEffect> pe1(buffer.readPathEffect()); 80 SkAutoTUnref<SkPathEffect> pe1(buffer.readPathEffect());
89 return SkSumPathEffect::Create(pe0, pe1); 81 return SkSumPathEffect::Create(pe0, pe1);
90 } 82 }
91 83
92 bool SkSumPathEffect::filterPath(SkPath* dst, const SkPath& src, 84 bool SkSumPathEffect::filterPath(SkPath* dst, const SkPath& src,
93 SkStrokeRec* rec, const SkRect* cullRect) const { 85 SkStrokeRec* rec, const SkRect* cullRect) const {
94 // use bit-or so that we always call both, even if the first one succeeds 86 // use bit-or so that we always call both, even if the first one succeeds
95 return fPE0->filterPath(dst, src, rec, cullRect) | 87 return fPE0->filterPath(dst, src, rec, cullRect) |
96 fPE1->filterPath(dst, src, rec, cullRect); 88 fPE1->filterPath(dst, src, rec, cullRect);
97 } 89 }
OLDNEW
« no previous file with comments | « src/core/SkLocalMatrixShader.cpp ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698