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

Side by Side Diff: src/effects/SkMatrixConvolutionImageFilter.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 "SkMatrixConvolutionImageFilter.h" 8 #include "SkMatrixConvolutionImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 } 526 }
527 527
528 GR_DEFINE_EFFECT_TEST(GrMatrixConvolutionEffect); 528 GR_DEFINE_EFFECT_TEST(GrMatrixConvolutionEffect);
529 529
530 // A little bit less than the minimum # uniforms required by DX9SM2 (32). 530 // A little bit less than the minimum # uniforms required by DX9SM2 (32).
531 // Allows for a 5x5 kernel (or 25x1, for that matter). 531 // Allows for a 5x5 kernel (or 25x1, for that matter).
532 #define MAX_KERNEL_SIZE 25 532 #define MAX_KERNEL_SIZE 25
533 533
534 GrEffectRef* GrMatrixConvolutionEffect::TestCreate(SkMWCRandom* random, 534 GrEffectRef* GrMatrixConvolutionEffect::TestCreate(SkMWCRandom* random,
535 GrContext* context, 535 GrContext* context,
536 const GrDrawTargetCaps&,
536 GrTexture* textures[]) { 537 GrTexture* textures[]) {
537 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx : 538 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
538 GrEffectUnitTest::kAlphaTextureIdx; 539 GrEffectUnitTest::kAlphaTextureIdx;
539 int width = random->nextRangeU(1, MAX_KERNEL_SIZE); 540 int width = random->nextRangeU(1, MAX_KERNEL_SIZE);
540 int height = random->nextRangeU(1, MAX_KERNEL_SIZE / width); 541 int height = random->nextRangeU(1, MAX_KERNEL_SIZE / width);
541 SkISize kernelSize = SkISize::Make(width, height); 542 SkISize kernelSize = SkISize::Make(width, height);
542 SkAutoTDeleteArray<SkScalar> kernel(new SkScalar[width * height]); 543 SkAutoTDeleteArray<SkScalar> kernel(new SkScalar[width * height]);
543 for (int i = 0; i < width * height; i++) { 544 for (int i = 0; i < width * height; i++) {
544 kernel.get()[i] = random->nextSScalar1(); 545 kernel.get()[i] = random->nextSScalar1();
545 } 546 }
(...skipping 25 matching lines...) Expand all
571 fTarget, 572 fTarget,
572 fTileMode, 573 fTileMode,
573 fConvolveAlpha); 574 fConvolveAlpha);
574 } 575 }
575 return ok; 576 return ok;
576 } 577 }
577 578
578 /////////////////////////////////////////////////////////////////////////////// 579 ///////////////////////////////////////////////////////////////////////////////
579 580
580 #endif 581 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698