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

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

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkTestImageFilters.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 "SkMorphologyImageFilter.h" 8 #include "SkMorphologyImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 const SkIRect& srcRect, 494 const SkIRect& srcRect,
495 const SkIRect& dstRect, 495 const SkIRect& dstRect,
496 int radius, 496 int radius,
497 GrMorphologyEffect::MorphologyType morphType, 497 GrMorphologyEffect::MorphologyType morphType,
498 Gr1DKernelEffect::Direction direction) { 498 Gr1DKernelEffect::Direction direction) {
499 GrPaint paint; 499 GrPaint paint;
500 paint.addColorEffect(GrMorphologyEffect::Create(texture, 500 paint.addColorEffect(GrMorphologyEffect::Create(texture,
501 direction, 501 direction,
502 radius, 502 radius,
503 morphType))->unref(); 503 morphType))->unref();
504 context->drawRectToRect(paint, SkRect::MakeFromIRect(dstRect), SkRect::MakeF romIRect(srcRect)); 504 context->drawRectToRect(paint, SkRect::Make(dstRect), SkRect::Make(srcRect)) ;
505 } 505 }
506 506
507 bool apply_morphology(const SkBitmap& input, 507 bool apply_morphology(const SkBitmap& input,
508 const SkIRect& rect, 508 const SkIRect& rect,
509 GrMorphologyEffect::MorphologyType morphType, 509 GrMorphologyEffect::MorphologyType morphType,
510 SkISize radius, 510 SkISize radius,
511 SkBitmap* dst) { 511 SkBitmap* dst) {
512 GrTexture* srcTexture = input.getTexture(); 512 GrTexture* srcTexture = input.getTexture();
513 SkASSERT(NULL != srcTexture); 513 SkASSERT(NULL != srcTexture);
514 GrContext* context = srcTexture->getContext(); 514 GrContext* context = srcTexture->getContext();
(...skipping 99 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/SkBlurMaskFilter.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698