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

Unified Diff: src/core/SkImageFilter.cpp

Issue 1709753002: Mark existing image filter entry points that will be going away with Deprecated (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/core/SkLocalMatrixImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 55abb8887f2476c44dbbdb9b377d23b206a348f4..a38124b0e62b4db1894883e7654630cff0de9a1d 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -231,9 +231,9 @@ void SkImageFilter::flatten(SkWriteBuffer& buffer) const {
buffer.writeUInt(fCropRect.flags());
}
-bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
- const Context& context,
- SkBitmap* result, SkIPoint* offset) const {
+bool SkImageFilter::filterImageDeprecated(Proxy* proxy, const SkBitmap& src,
+ const Context& context,
+ SkBitmap* result, SkIPoint* offset) const {
SkASSERT(result);
SkASSERT(offset);
uint32_t srcGenID = fUsesSrcInput ? src.getGenerationID() : 0;
@@ -248,7 +248,7 @@ bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
* the filter to do it.
*/
if ((proxy && proxy->filterImage(this, src, context, result, offset)) ||
- this->onFilterImage(proxy, src, context, result, offset)) {
+ this->onFilterImageDeprecated(proxy, src, context, result, offset)) {
if (context.cache()) {
context.cache()->set(key, *result, *offset);
SkAutoMutexAcquire mutex(fMutex);
@@ -259,14 +259,14 @@ bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
return false;
}
-bool SkImageFilter::filterInput(int index, Proxy* proxy, const SkBitmap& src,
- const Context& ctx,
- SkBitmap* result, SkIPoint* offset) const {
+bool SkImageFilter::filterInputDeprecated(int index, Proxy* proxy, const SkBitmap& src,
+ const Context& ctx,
+ SkBitmap* result, SkIPoint* offset) const {
SkImageFilter* input = this->getInput(index);
if (!input) {
return true;
}
- return input->filterImage(proxy, src, this->mapContext(ctx), result, offset);
+ return input->filterImageDeprecated(proxy, src, this->mapContext(ctx), result, offset);
}
bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst,
@@ -319,8 +319,8 @@ bool SkImageFilter::canComputeFastBounds() const {
return true;
}
-bool SkImageFilter::onFilterImage(Proxy*, const SkBitmap&, const Context&,
- SkBitmap*, SkIPoint*) const {
+bool SkImageFilter::onFilterImageDeprecated(Proxy*, const SkBitmap&, const Context&,
+ SkBitmap*, SkIPoint*) const {
return false;
}
@@ -328,18 +328,18 @@ bool SkImageFilter::canFilterImageGPU() const {
return this->asFragmentProcessor(nullptr, nullptr, SkMatrix::I(), SkIRect());
}
-bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
- SkBitmap* result, SkIPoint* offset) const {
+bool SkImageFilter::filterImageGPUDeprecated(Proxy* proxy, const SkBitmap& src, const Context& ctx,
+ SkBitmap* result, SkIPoint* offset) const {
#if SK_SUPPORT_GPU
SkBitmap input = src;
SkASSERT(fInputCount == 1);
SkIPoint srcOffset = SkIPoint::Make(0, 0);
- if (!this->filterInputGPU(0, proxy, src, ctx, &input, &srcOffset)) {
+ if (!this->filterInputGPUDeprecated(0, proxy, src, ctx, &input, &srcOffset)) {
return false;
}
GrTexture* srcTexture = input.getTexture();
SkIRect bounds;
- if (!this->applyCropRect(ctx, proxy, input, &srcOffset, &bounds, &input)) {
+ if (!this->applyCropRectDeprecated(ctx, proxy, input, &srcOffset, &bounds, &input)) {
return false;
}
GrContext* context = srcTexture->getContext();
@@ -406,8 +406,9 @@ bool SkImageFilter::applyCropRect(const Context& ctx, const SkIRect& srcBounds,
return dstBounds->intersect(ctx.clipBounds());
}
-bool SkImageFilter::applyCropRect(const Context& ctx, Proxy* proxy, const SkBitmap& src,
- SkIPoint* srcOffset, SkIRect* bounds, SkBitmap* dst) const {
+bool SkImageFilter::applyCropRectDeprecated(const Context& ctx, Proxy* proxy, const SkBitmap& src,
+ SkIPoint* srcOffset, SkIRect* bounds,
+ SkBitmap* dst) const {
SkIRect srcBounds;
src.getBounds(&srcBounds);
srcBounds.offset(*srcOffset);
@@ -495,9 +496,9 @@ SkImageFilter* SkImageFilter::newWithLocalMatrix(const SkMatrix& matrix) const {
#if SK_SUPPORT_GPU
-bool SkImageFilter::filterInputGPU(int index, SkImageFilter::Proxy* proxy,
- const SkBitmap& src, const Context& ctx,
- SkBitmap* result, SkIPoint* offset) const {
+bool SkImageFilter::filterInputGPUDeprecated(int index, SkImageFilter::Proxy* proxy,
+ const SkBitmap& src, const Context& ctx,
+ SkBitmap* result, SkIPoint* offset) const {
SkImageFilter* input = this->getInput(index);
if (!input) {
return true;
@@ -506,7 +507,7 @@ bool SkImageFilter::filterInputGPU(int index, SkImageFilter::Proxy* proxy,
// matrix with no clip and that the matrix, clip, and render target set before this function was
// called are restored before we return to the caller.
GrContext* context = src.getTexture()->getContext();
- if (input->filterImage(proxy, src, this->mapContext(ctx), result, offset)) {
+ if (input->filterImageDeprecated(proxy, src, this->mapContext(ctx), result, offset)) {
if (!result->getTexture()) {
const SkImageInfo info = result->info();
if (kUnknown_SkColorType == info.colorType()) {
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/core/SkLocalMatrixImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698