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

Side by Side Diff: src/core/SkImageFilter.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 | « include/gpu/GrStagedProcessor.h ('k') | src/effects/SkBlurMaskFilter.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 "SkImageFilter.h" 8 #include "SkImageFilter.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 GrFragmentProcessor* fp; 346 GrFragmentProcessor* fp;
347 offset->fX = bounds.left(); 347 offset->fX = bounds.left();
348 offset->fY = bounds.top(); 348 offset->fY = bounds.top();
349 bounds.offset(-srcOffset); 349 bounds.offset(-srcOffset);
350 SkMatrix matrix(ctx.ctm()); 350 SkMatrix matrix(ctx.ctm());
351 matrix.postTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.to p())); 351 matrix.postTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.to p()));
352 GrPaint paint; 352 GrPaint paint;
353 if (this->asFragmentProcessor(&fp, paint.getProcessorDataManager(), srcTextu re, matrix, bounds)) { 353 if (this->asFragmentProcessor(&fp, paint.getProcessorDataManager(), srcTextu re, matrix, bounds)) {
354 SkASSERT(fp); 354 SkASSERT(fp);
355 paint.addColorFragmentProcessor(fp)->unref(); 355 paint.addColorProcessor(fp)->unref();
356 356
357 GrDrawContext* drawContext = context->drawContext(); 357 GrDrawContext* drawContext = context->drawContext();
358 if (drawContext) { 358 if (drawContext) {
359 drawContext->drawNonAARectToRect(dst->asRenderTarget(), clip, paint, SkMatrix::I(), 359 drawContext->drawNonAARectToRect(dst->asRenderTarget(), clip, paint, SkMatrix::I(),
360 dstRect, srcRect); 360 dstRect, srcRect);
361 361
362 WrapTexture(dst, bounds.width(), bounds.height(), result); 362 WrapTexture(dst, bounds.width(), bounds.height(), result);
363 return true; 363 return true;
364 } 364 }
365 } 365 }
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 } 595 }
596 return dev; 596 return dev;
597 } 597 }
598 598
599 bool SkImageFilter::Proxy::filterImage(const SkImageFilter* filter, const SkBitm ap& src, 599 bool SkImageFilter::Proxy::filterImage(const SkImageFilter* filter, const SkBitm ap& src,
600 const SkImageFilter::Context& ctx, 600 const SkImageFilter::Context& ctx,
601 SkBitmap* result, SkIPoint* offset) { 601 SkBitmap* result, SkIPoint* offset) {
602 return fDevice->filterImage(filter, src, ctx, result, offset); 602 return fDevice->filterImage(filter, src, ctx, result, offset);
603 } 603 }
604 604
OLDNEW
« no previous file with comments | « include/gpu/GrStagedProcessor.h ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698