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

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

Issue 19449002: Replace all instances of GrRect with SkRect. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/gpu/GrAAHairLinePathRenderer.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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 GrTexture* apply_morphology(GrTexture* srcTexture, 462 GrTexture* apply_morphology(GrTexture* srcTexture,
463 const SkIRect& rect, 463 const SkIRect& rect,
464 GrMorphologyEffect::MorphologyType morphType, 464 GrMorphologyEffect::MorphologyType morphType,
465 SkISize radius) { 465 SkISize radius) {
466 GrContext* context = srcTexture->getContext(); 466 GrContext* context = srcTexture->getContext();
467 srcTexture->ref(); 467 srcTexture->ref();
468 468
469 GrContext::AutoMatrix am; 469 GrContext::AutoMatrix am;
470 am.setIdentity(context); 470 am.setIdentity(context);
471 471
472 GrContext::AutoClip acs(context, GrRect::MakeWH(SkIntToScalar(srcTexture->wi dth()), 472 GrContext::AutoClip acs(context, SkRect::MakeWH(SkIntToScalar(srcTexture->wi dth()),
473 SkIntToScalar(srcTexture->he ight()))); 473 SkIntToScalar(srcTexture->he ight())));
474 474
475 GrTextureDesc desc; 475 GrTextureDesc desc;
476 desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit; 476 desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit;
477 desc.fWidth = rect.width(); 477 desc.fWidth = rect.width();
478 desc.fHeight = rect.height(); 478 desc.fHeight = rect.height();
479 desc.fConfig = kSkia8888_GrPixelConfig; 479 desc.fConfig = kSkia8888_GrPixelConfig;
480 480
481 if (radius.fWidth > 0) { 481 if (radius.fWidth > 0) {
482 GrAutoScratchTexture ast(context, desc); 482 GrAutoScratchTexture ast(context, desc);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 } 524 }
525 GrTexture* input = inputBM.getTexture(); 525 GrTexture* input = inputBM.getTexture();
526 SkIRect bounds; 526 SkIRect bounds;
527 src.getBounds(&bounds); 527 src.getBounds(&bounds);
528 SkAutoTUnref<GrTexture> resultTex(apply_morphology(input, bounds, 528 SkAutoTUnref<GrTexture> resultTex(apply_morphology(input, bounds,
529 GrMorphologyEffect::kErode_MorphologyType, radius())); 529 GrMorphologyEffect::kErode_MorphologyType, radius()));
530 return SkImageFilterUtils::WrapTexture(resultTex, src.width(), src.height(), result); 530 return SkImageFilterUtils::WrapTexture(resultTex, src.width(), src.height(), result);
531 } 531 }
532 532
533 #endif 533 #endif
OLDNEW
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698