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

Side by Side Diff: src/effects/SkPaintImageFilter.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 unified diff | Download patch
« no previous file with comments | « src/effects/SkOffsetImageFilter.cpp ('k') | src/effects/SkPictureImageFilter.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 2016 Google Inc. 2 * Copyright 2016 Google Inc.
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 "SkPaintImageFilter.h" 8 #include "SkPaintImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 15 matching lines...) Expand all
26 SkPaint paint; 26 SkPaint paint;
27 buffer.readPaint(&paint); 27 buffer.readPaint(&paint);
28 return Create(paint, &common.cropRect()); 28 return Create(paint, &common.cropRect());
29 } 29 }
30 30
31 void SkPaintImageFilter::flatten(SkWriteBuffer& buffer) const { 31 void SkPaintImageFilter::flatten(SkWriteBuffer& buffer) const {
32 this->INHERITED::flatten(buffer); 32 this->INHERITED::flatten(buffer);
33 buffer.writePaint(fPaint); 33 buffer.writePaint(fPaint);
34 } 34 }
35 35
36 bool SkPaintImageFilter::onFilterImage(Proxy* proxy, 36 bool SkPaintImageFilter::onFilterImageDeprecated(Proxy* proxy,
37 const SkBitmap& source, 37 const SkBitmap& source,
38 const Context& ctx, 38 const Context& ctx,
39 SkBitmap* result, 39 SkBitmap* result,
40 SkIPoint* offset) const { 40 SkIPoint* offset) const {
41 SkIRect bounds; 41 SkIRect bounds;
42 if (!this->applyCropRect(ctx, source.bounds(), &bounds)) { 42 if (!this->applyCropRect(ctx, source.bounds(), &bounds)) {
43 return false; 43 return false;
44 } 44 }
45 45
46 SkAutoTUnref<SkBaseDevice> device(proxy->createDevice(bounds.width(), 46 SkAutoTUnref<SkBaseDevice> device(proxy->createDevice(bounds.width(),
47 bounds.height())); 47 bounds.height()));
48 if (nullptr == device.get()) { 48 if (nullptr == device.get()) {
49 return false; 49 return false;
50 } 50 }
(...skipping 21 matching lines...) Expand all
72 // so we can't compute it. If a full crop rect is set, we should return true here. 72 // so we can't compute it. If a full crop rect is set, we should return true here.
73 return false; 73 return false;
74 } 74 }
75 75
76 #ifndef SK_IGNORE_TO_STRING 76 #ifndef SK_IGNORE_TO_STRING
77 void SkPaintImageFilter::toString(SkString* str) const { 77 void SkPaintImageFilter::toString(SkString* str) const {
78 str->appendf("SkPaintImageFilter: ("); 78 str->appendf("SkPaintImageFilter: (");
79 str->append(")"); 79 str->append(")");
80 } 80 }
81 #endif 81 #endif
OLDNEW
« no previous file with comments | « src/effects/SkOffsetImageFilter.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698