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

Side by Side Diff: src/effects/SkBlurDrawLooper.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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/effects/SkArithmeticMode_gpu.cpp ('k') | src/effects/SkBlurMask.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 2011 Google Inc. 2 * Copyright 2011 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 "SkBlurDrawLooper.h" 8 #include "SkBlurDrawLooper.h"
9 #include "SkBlurMask.h" // just for SkBlurMask::ConvertRadiusToSigma 9 #include "SkBlurMask.h" // just for SkBlurMask::ConvertRadiusToSigma
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 rec->fStyle = kNormal_SkBlurStyle; 96 rec->fStyle = kNormal_SkBlurStyle;
97 rec->fQuality = (fBlurFlags & kHighQuality_BlurFlag) ? 97 rec->fQuality = (fBlurFlags & kHighQuality_BlurFlag) ?
98 kHigh_SkBlurQuality : kLow_SkBlurQuality; 98 kHigh_SkBlurQuality : kLow_SkBlurQuality;
99 } 99 }
100 return true; 100 return true;
101 } 101 }
102 102
103 //////////////////////////////////////////////////////////////////////////////// //////// 103 //////////////////////////////////////////////////////////////////////////////// ////////
104 104
105 SkDrawLooper::Context* SkBlurDrawLooper::createContext(SkCanvas*, void* storage) const { 105 SkDrawLooper::Context* SkBlurDrawLooper::createContext(SkCanvas*, void* storage) const {
106 return SkNEW_PLACEMENT_ARGS(storage, BlurDrawLooperContext, (this)); 106 return new (storage) BlurDrawLooperContext(this);
107 } 107 }
108 108
109 SkBlurDrawLooper::BlurDrawLooperContext::BlurDrawLooperContext( 109 SkBlurDrawLooper::BlurDrawLooperContext::BlurDrawLooperContext(
110 const SkBlurDrawLooper* looper) 110 const SkBlurDrawLooper* looper)
111 : fLooper(looper), fState(SkBlurDrawLooper::kBeforeEdge) {} 111 : fLooper(looper), fState(SkBlurDrawLooper::kBeforeEdge) {}
112 112
113 bool SkBlurDrawLooper::BlurDrawLooperContext::next(SkCanvas* canvas, 113 bool SkBlurDrawLooper::BlurDrawLooperContext::next(SkCanvas* canvas,
114 SkPaint* paint) { 114 SkPaint* paint) {
115 switch (fState) { 115 switch (fState) {
116 case kBeforeEdge: 116 case kBeforeEdge:
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 &needsSeparator); 175 &needsSeparator);
176 SkAddFlagToString(str, SkToBool(kHighQuality_BlurFlag & fBlurFlags), "Hi ghQuality", 176 SkAddFlagToString(str, SkToBool(kHighQuality_BlurFlag & fBlurFlags), "Hi ghQuality",
177 &needsSeparator); 177 &needsSeparator);
178 } 178 }
179 str->append(")"); 179 str->append(")");
180 180
181 // TODO: add optional "fBlurFilter->toString(str);" when SkMaskFilter::toStr ing is added 181 // TODO: add optional "fBlurFilter->toString(str);" when SkMaskFilter::toStr ing is added
182 // alternatively we could cache the radius in SkBlurDrawLooper and just add it here 182 // alternatively we could cache the radius in SkBlurDrawLooper and just add it here
183 } 183 }
184 #endif 184 #endif
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.cpp ('k') | src/effects/SkBlurMask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698