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

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

Issue 1306803003: Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/SkLightingImageFilter.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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 GrRenderTarget* rt, 464 GrRenderTarget* rt,
465 const GrClip& clip, 465 const GrClip& clip,
466 GrTexture* texture, 466 GrTexture* texture,
467 const SkIRect& srcRect, 467 const SkIRect& srcRect,
468 const SkIRect& dstRect, 468 const SkIRect& dstRect,
469 int radius, 469 int radius,
470 GrMorphologyEffect::MorphologyType morphType, 470 GrMorphologyEffect::MorphologyType morphType,
471 float bounds[2], 471 float bounds[2],
472 Gr1DKernelEffect::Direction direction) { 472 Gr1DKernelEffect::Direction direction) {
473 GrPaint paint; 473 GrPaint paint;
474 paint.addColorFragmentProcessor(GrMorphologyEffect::Create(paint.getProcesso rDataManager(), 474 paint.addColorProcessor(GrMorphologyEffect::Create(paint.getProcessorDataMan ager(),
475 texture, 475 texture,
476 direction, 476 direction,
477 radius, 477 radius,
478 morphType, 478 morphType,
479 bounds))->unref() ; 479 bounds))->unref();
480 drawContext->drawNonAARectToRect(rt, clip, paint, SkMatrix::I(), SkRect::Mak e(dstRect), 480 drawContext->drawNonAARectToRect(rt, clip, paint, SkMatrix::I(), SkRect::Mak e(dstRect),
481 SkRect::Make(srcRect)); 481 SkRect::Make(srcRect));
482 } 482 }
483 483
484 void apply_morphology_rect_no_bounds(GrDrawContext* drawContext, 484 void apply_morphology_rect_no_bounds(GrDrawContext* drawContext,
485 GrRenderTarget* rt, 485 GrRenderTarget* rt,
486 const GrClip& clip, 486 const GrClip& clip,
487 GrTexture* texture, 487 GrTexture* texture,
488 const SkIRect& srcRect, 488 const SkIRect& srcRect,
489 const SkIRect& dstRect, 489 const SkIRect& dstRect,
490 int radius, 490 int radius,
491 GrMorphologyEffect::MorphologyType morphTyp e, 491 GrMorphologyEffect::MorphologyType morphTyp e,
492 Gr1DKernelEffect::Direction direction) { 492 Gr1DKernelEffect::Direction direction) {
493 GrPaint paint; 493 GrPaint paint;
494 paint.addColorFragmentProcessor(GrMorphologyEffect::Create(paint.getProcesso rDataManager(), 494 paint.addColorProcessor(GrMorphologyEffect::Create(paint.getProcessorDataMan ager(),
495 texture, 495 texture,
496 direction, 496 direction,
497 radius, 497 radius,
498 morphType))->unre f(); 498 morphType))->unref();
499 drawContext->drawNonAARectToRect(rt, clip, paint, SkMatrix::I(), SkRect::Mak e(dstRect), 499 drawContext->drawNonAARectToRect(rt, clip, paint, SkMatrix::I(), SkRect::Mak e(dstRect),
500 SkRect::Make(srcRect)); 500 SkRect::Make(srcRect));
501 } 501 }
502 502
503 void apply_morphology_pass(GrDrawContext* drawContext, 503 void apply_morphology_pass(GrDrawContext* drawContext,
504 GrRenderTarget* rt, 504 GrRenderTarget* rt,
505 const GrClip& clip, 505 const GrClip& clip,
506 GrTexture* texture, 506 GrTexture* texture,
507 const SkIRect& srcRect, 507 const SkIRect& srcRect,
508 const SkIRect& dstRect, 508 const SkIRect& dstRect,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 SkBitmap* result, SkIPoint* offset) con st { 662 SkBitmap* result, SkIPoint* offset) con st {
663 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); 663 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset);
664 } 664 }
665 665
666 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, 666 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
667 SkBitmap* result, SkIPoint* offset) cons t { 667 SkBitmap* result, SkIPoint* offset) cons t {
668 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); 668 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset);
669 } 669 }
670 670
671 #endif 671 #endif
OLDNEW
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkXfermodeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698