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

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

Issue 12965018: Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 zoom.coordsType(), 194 zoom.coordsType(),
195 zoom.texture(0)); 195 zoom.texture(0));
196 } 196 }
197 197
198 ///////////////////////////////////////////////////////////////////// 198 /////////////////////////////////////////////////////////////////////
199 199
200 GR_DEFINE_EFFECT_TEST(GrMagnifierEffect); 200 GR_DEFINE_EFFECT_TEST(GrMagnifierEffect);
201 201
202 GrEffectRef* GrMagnifierEffect::TestCreate(SkMWCRandom* random, 202 GrEffectRef* GrMagnifierEffect::TestCreate(SkMWCRandom* random,
203 GrContext* context, 203 GrContext* context,
204 const GrDrawTargetCaps&,
204 GrTexture** textures) { 205 GrTexture** textures) {
205 const int kMaxWidth = 200; 206 const int kMaxWidth = 200;
206 const int kMaxHeight = 200; 207 const int kMaxHeight = 200;
207 const int kMaxInset = 20; 208 const int kMaxInset = 20;
208 uint32_t width = random->nextULessThan(kMaxWidth); 209 uint32_t width = random->nextULessThan(kMaxWidth);
209 uint32_t height = random->nextULessThan(kMaxHeight); 210 uint32_t height = random->nextULessThan(kMaxHeight);
210 uint32_t x = random->nextULessThan(kMaxWidth - width); 211 uint32_t x = random->nextULessThan(kMaxWidth - width);
211 uint32_t y = random->nextULessThan(kMaxHeight - height); 212 uint32_t y = random->nextULessThan(kMaxHeight - height);
212 SkScalar inset = SkIntToScalar(random->nextULessThan(kMaxInset)); 213 SkScalar inset = SkIntToScalar(random->nextULessThan(kMaxInset));
213 214
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 347
347 int x_val = SkMin32(SkScalarFloorToInt(x_interp), width - 1); 348 int x_val = SkMin32(SkScalarFloorToInt(x_interp), width - 1);
348 int y_val = SkMin32(SkScalarFloorToInt(y_interp), height - 1); 349 int y_val = SkMin32(SkScalarFloorToInt(y_interp), height - 1);
349 350
350 *dptr = sptr[y_val * width + x_val]; 351 *dptr = sptr[y_val * width + x_val];
351 dptr++; 352 dptr++;
352 } 353 }
353 } 354 }
354 return true; 355 return true;
355 } 356 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698