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

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

Issue 62163004: Added support for Chrome's gpu command buffer extension BindUniformLocation. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fixed compile error on the bots + feedback. Created 7 years, 1 month 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 "SkMorphologyImageFilter.h" 8 #include "SkMorphologyImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 switch (kern.direction()) { 427 switch (kern.direction()) {
428 case Gr1DKernelEffect::kX_Direction: 428 case Gr1DKernelEffect::kX_Direction:
429 imageIncrement[0] = 1.0f / texture.width(); 429 imageIncrement[0] = 1.0f / texture.width();
430 break; 430 break;
431 case Gr1DKernelEffect::kY_Direction: 431 case Gr1DKernelEffect::kY_Direction:
432 imageIncrement[1] = 1.0f / texture.height(); 432 imageIncrement[1] = 1.0f / texture.height();
433 break; 433 break;
434 default: 434 default:
435 GrCrash("Unknown filter direction."); 435 GrCrash("Unknown filter direction.");
436 } 436 }
437 uman.set2fv(fImageIncrementUni, 0, 1, imageIncrement); 437 uman.set2fv(fImageIncrementUni, 1, imageIncrement);
438 } 438 }
439 439
440 /////////////////////////////////////////////////////////////////////////////// 440 ///////////////////////////////////////////////////////////////////////////////
441 441
442 GrMorphologyEffect::GrMorphologyEffect(GrTexture* texture, 442 GrMorphologyEffect::GrMorphologyEffect(GrTexture* texture,
443 Direction direction, 443 Direction direction,
444 int radius, 444 int radius,
445 MorphologyType type) 445 MorphologyType type)
446 : Gr1DKernelEffect(texture, direction, radius) 446 : Gr1DKernelEffect(texture, direction, radius)
447 , fType(type) { 447 , fType(type) {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 614
615 if (!apply_morphology(input, bounds, GrMorphologyEffect::kErode_MorphologyTy pe, radius(), result)) { 615 if (!apply_morphology(input, bounds, GrMorphologyEffect::kErode_MorphologyTy pe, radius(), result)) {
616 return false; 616 return false;
617 } 617 }
618 offset->fX += bounds.left(); 618 offset->fX += bounds.left();
619 offset->fY += bounds.top(); 619 offset->fY += bounds.top();
620 return true; 620 return true;
621 } 621 }
622 622
623 #endif 623 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698