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

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

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 6 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
« no previous file with comments | « src/effects/SkGpuBlurUtils.cpp ('k') | src/effects/SkXfermodeImageFilter.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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 SkASSERT(srcTexture); 506 SkASSERT(srcTexture);
507 GrContext* context = srcTexture->getContext(); 507 GrContext* context = srcTexture->getContext();
508 508
509 GrContext::AutoMatrix am; 509 GrContext::AutoMatrix am;
510 am.setIdentity(context); 510 am.setIdentity(context);
511 511
512 GrContext::AutoClip acs(context, SkRect::MakeWH(SkIntToScalar(srcTexture->wi dth()), 512 GrContext::AutoClip acs(context, SkRect::MakeWH(SkIntToScalar(srcTexture->wi dth()),
513 SkIntToScalar(srcTexture->he ight()))); 513 SkIntToScalar(srcTexture->he ight())));
514 514
515 SkIRect dstRect = SkIRect::MakeWH(rect.width(), rect.height()); 515 SkIRect dstRect = SkIRect::MakeWH(rect.width(), rect.height());
516 GrTextureDesc desc; 516 GrSurfaceDesc desc;
517 desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit; 517 desc.fFlags = kRenderTarget_GrSurfaceFlag | kNoStencil_GrSurfaceFlag;
518 desc.fWidth = rect.width(); 518 desc.fWidth = rect.width();
519 desc.fHeight = rect.height(); 519 desc.fHeight = rect.height();
520 desc.fConfig = kSkia8888_GrPixelConfig; 520 desc.fConfig = kSkia8888_GrPixelConfig;
521 SkIRect srcRect = rect; 521 SkIRect srcRect = rect;
522 522
523 if (radius.fWidth > 0) { 523 if (radius.fWidth > 0) {
524 GrTexture* texture = context->refScratchTexture(desc, GrContext::kApprox _ScratchTexMatch); 524 GrTexture* texture = context->refScratchTexture(desc, GrContext::kApprox _ScratchTexMatch);
525 if (NULL == texture) { 525 if (NULL == texture) {
526 return false; 526 return false;
527 } 527 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 SkBitmap* result, SkIPoint* offset) con st { 600 SkBitmap* result, SkIPoint* offset) con st {
601 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); 601 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset);
602 } 602 }
603 603
604 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, 604 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
605 SkBitmap* result, SkIPoint* offset) cons t { 605 SkBitmap* result, SkIPoint* offset) cons t {
606 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); 606 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset);
607 } 607 }
608 608
609 #endif 609 #endif
OLDNEW
« no previous file with comments | « src/effects/SkGpuBlurUtils.cpp ('k') | src/effects/SkXfermodeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698