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

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

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkPerlinNoiseShader.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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 morphType))->unref(); 495 morphType))->unref();
496 context->drawRectToRect(paint, SkRect::Make(dstRect), SkRect::Make(srcRect)) ; 496 context->drawRectToRect(paint, SkRect::Make(dstRect), SkRect::Make(srcRect)) ;
497 } 497 }
498 498
499 bool apply_morphology(const SkBitmap& input, 499 bool apply_morphology(const SkBitmap& input,
500 const SkIRect& rect, 500 const SkIRect& rect,
501 GrMorphologyEffect::MorphologyType morphType, 501 GrMorphologyEffect::MorphologyType morphType,
502 SkISize radius, 502 SkISize radius,
503 SkBitmap* dst) { 503 SkBitmap* dst) {
504 GrTexture* srcTexture = input.getTexture(); 504 GrTexture* srcTexture = input.getTexture();
505 SkASSERT(NULL != srcTexture); 505 SkASSERT(srcTexture);
506 GrContext* context = srcTexture->getContext(); 506 GrContext* context = srcTexture->getContext();
507 srcTexture->ref(); 507 srcTexture->ref();
508 SkAutoTUnref<GrTexture> src(srcTexture); 508 SkAutoTUnref<GrTexture> src(srcTexture);
509 509
510 GrContext::AutoMatrix am; 510 GrContext::AutoMatrix am;
511 am.setIdentity(context); 511 am.setIdentity(context);
512 512
513 GrContext::AutoClip acs(context, SkRect::MakeWH(SkIntToScalar(srcTexture->wi dth()), 513 GrContext::AutoClip acs(context, SkRect::MakeWH(SkIntToScalar(srcTexture->wi dth()),
514 SkIntToScalar(srcTexture->he ight()))); 514 SkIntToScalar(srcTexture->he ight())));
515 515
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 SkBitmap* result, SkIPoint* offset) con st { 601 SkBitmap* result, SkIPoint* offset) con st {
602 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); 602 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset);
603 } 603 }
604 604
605 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, 605 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
606 SkBitmap* result, SkIPoint* offset) cons t { 606 SkBitmap* result, SkIPoint* offset) cons t {
607 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); 607 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset);
608 } 608 }
609 609
610 #endif 610 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698