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

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

Issue 1316513002: Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Address comments, fix roll(?) 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/SkLightingImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.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 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkMagnifierImageFilter.h" 9 #include "SkMagnifierImageFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 GrProcessorKeyBuilder* b) const { 188 GrProcessorKeyBuilder* b) const {
189 GrGLMagnifierEffect::GenKey(*this, caps, b); 189 GrGLMagnifierEffect::GenKey(*this, caps, b);
190 } 190 }
191 191
192 GrGLFragmentProcessor* GrMagnifierEffect::onCreateGLInstance() const { 192 GrGLFragmentProcessor* GrMagnifierEffect::onCreateGLInstance() const {
193 return new GrGLMagnifierEffect(*this); 193 return new GrGLMagnifierEffect(*this);
194 } 194 }
195 195
196 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMagnifierEffect); 196 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMagnifierEffect);
197 197
198 GrFragmentProcessor* GrMagnifierEffect::TestCreate(GrProcessorTestData* d) { 198 const GrFragmentProcessor* GrMagnifierEffect::TestCreate(GrProcessorTestData* d) {
199 GrTexture* texture = d->fTextures[0]; 199 GrTexture* texture = d->fTextures[0];
200 const int kMaxWidth = 200; 200 const int kMaxWidth = 200;
201 const int kMaxHeight = 200; 201 const int kMaxHeight = 200;
202 const int kMaxInset = 20; 202 const int kMaxInset = 20;
203 uint32_t width = d->fRandom->nextULessThan(kMaxWidth); 203 uint32_t width = d->fRandom->nextULessThan(kMaxWidth);
204 uint32_t height = d->fRandom->nextULessThan(kMaxHeight); 204 uint32_t height = d->fRandom->nextULessThan(kMaxHeight);
205 uint32_t x = d->fRandom->nextULessThan(kMaxWidth - width); 205 uint32_t x = d->fRandom->nextULessThan(kMaxWidth - width);
206 uint32_t y = d->fRandom->nextULessThan(kMaxHeight - height); 206 uint32_t y = d->fRandom->nextULessThan(kMaxHeight - height);
207 uint32_t inset = d->fRandom->nextULessThan(kMaxInset); 207 uint32_t inset = d->fRandom->nextULessThan(kMaxInset);
208 208
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 #ifndef SK_IGNORE_TO_STRING 374 #ifndef SK_IGNORE_TO_STRING
375 void SkMagnifierImageFilter::toString(SkString* str) const { 375 void SkMagnifierImageFilter::toString(SkString* str) const {
376 str->appendf("SkMagnifierImageFilter: ("); 376 str->appendf("SkMagnifierImageFilter: (");
377 str->appendf("src: (%f,%f,%f,%f) ", 377 str->appendf("src: (%f,%f,%f,%f) ",
378 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m); 378 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m);
379 str->appendf("inset: %f", fInset); 379 str->appendf("inset: %f", fInset);
380 str->append(")"); 380 str->append(")");
381 } 381 }
382 #endif 382 #endif
OLDNEW
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698