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

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

Issue 212103010: Add asADash entry point into SkPathEffect to allow extracting Dash info from PathEffects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Constructor Fix Created 6 years, 8 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
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"
11 #include "SkReadBuffer.h" 11 #include "SkReadBuffer.h"
12 #include "SkWriteBuffer.h" 12 #include "SkWriteBuffer.h"
13 13
14 /////////////////////////////////////////////////////////////////////////////// 14 ///////////////////////////////////////////////////////////////////////////////
15 15
16 void SkPathEffect::computeFastBounds(SkRect* dst, const SkRect& src) const { 16 void SkPathEffect::computeFastBounds(SkRect* dst, const SkRect& src) const {
17 *dst = src; 17 *dst = src;
18 } 18 }
19 19
20 bool SkPathEffect::asPoints(PointData* results, const SkPath& src, 20 bool SkPathEffect::asPoints(PointData* results, const SkPath& src,
21 const SkStrokeRec&, const SkMatrix&, const SkRect*) const { 21 const SkStrokeRec&, const SkMatrix&, const SkRect*) const {
22 return false; 22 return false;
23 } 23 }
24 24
25 SkPathEffect::DashType SkPathEffect::asADash(DashInfo* info) const {
26 return kNone_DashType;
27 }
28
25 /////////////////////////////////////////////////////////////////////////////// 29 ///////////////////////////////////////////////////////////////////////////////
26 30
27 SkPairPathEffect::SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1) 31 SkPairPathEffect::SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1)
28 : fPE0(pe0), fPE1(pe1) { 32 : fPE0(pe0), fPE1(pe1) {
29 SkASSERT(pe0); 33 SkASSERT(pe0);
30 SkASSERT(pe1); 34 SkASSERT(pe1);
31 fPE0->ref(); 35 fPE0->ref();
32 fPE1->ref(); 36 fPE1->ref();
33 } 37 }
34 38
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 75 }
72 76
73 /////////////////////////////////////////////////////////////////////////////// 77 ///////////////////////////////////////////////////////////////////////////////
74 78
75 bool SkSumPathEffect::filterPath(SkPath* dst, const SkPath& src, 79 bool SkSumPathEffect::filterPath(SkPath* dst, const SkPath& src,
76 SkStrokeRec* rec, const SkRect* cullRect) const { 80 SkStrokeRec* rec, const SkRect* cullRect) const {
77 // use bit-or so that we always call both, even if the first one succeeds 81 // use bit-or so that we always call both, even if the first one succeeds
78 return fPE0->filterPath(dst, src, rec, cullRect) | 82 return fPE0->filterPath(dst, src, rec, cullRect) |
79 fPE1->filterPath(dst, src, rec, cullRect); 83 fPE1->filterPath(dst, src, rec, cullRect);
80 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698