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

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

Issue 769953002: Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/SkTileImageFilter.cpp ('k') | src/effects/gradients/SkGradientShader.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 2013 The Android Open Source Project 2 * Copyright 2013 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 "SkXfermodeImageFilter.h" 8 #include "SkXfermodeImageFilter.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 14 matching lines...) Expand all
25 const CropRect* cropRect, 25 const CropRect* cropRect,
26 uint32_t uniqueID) 26 uint32_t uniqueID)
27 : INHERITED(2, inputs, cropRect, uniqueID), fMode(mode) { 27 : INHERITED(2, inputs, cropRect, uniqueID), fMode(mode) {
28 SkSafeRef(fMode); 28 SkSafeRef(fMode);
29 } 29 }
30 30
31 SkXfermodeImageFilter::~SkXfermodeImageFilter() { 31 SkXfermodeImageFilter::~SkXfermodeImageFilter() {
32 SkSafeUnref(fMode); 32 SkSafeUnref(fMode);
33 } 33 }
34 34
35 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
36 SkXfermodeImageFilter::SkXfermodeImageFilter(SkReadBuffer& buffer)
37 : INHERITED(2, buffer) {
38 fMode = buffer.readXfermode();
39 }
40 #endif
41
42 SkFlattenable* SkXfermodeImageFilter::CreateProc(SkReadBuffer& buffer) { 35 SkFlattenable* SkXfermodeImageFilter::CreateProc(SkReadBuffer& buffer) {
43 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 2); 36 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 2);
44 SkAutoTUnref<SkXfermode> mode(buffer.readXfermode()); 37 SkAutoTUnref<SkXfermode> mode(buffer.readXfermode());
45 return Create(mode, common.getInput(0), common.getInput(1), &common.cropRect (), common.uniqueID()); 38 return Create(mode, common.getInput(0), common.getInput(1), &common.cropRect (), common.uniqueID());
46 } 39 }
47 40
48 void SkXfermodeImageFilter::flatten(SkWriteBuffer& buffer) const { 41 void SkXfermodeImageFilter::flatten(SkWriteBuffer& buffer) const {
49 this->INHERITED::flatten(buffer); 42 this->INHERITED::flatten(buffer);
50 buffer.writeFlattenable(fMode); 43 buffer.writeFlattenable(fMode);
51 } 44 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 paint.addColorProcessor(xferProcessor)->unref(); 158 paint.addColorProcessor(xferProcessor)->unref();
166 context->drawRect(paint, srcRect); 159 context->drawRect(paint, srcRect);
167 160
168 offset->fX = backgroundOffset.fX; 161 offset->fX = backgroundOffset.fX;
169 offset->fY = backgroundOffset.fY; 162 offset->fY = backgroundOffset.fY;
170 WrapTexture(dst, src.width(), src.height(), result); 163 WrapTexture(dst, src.width(), src.height(), result);
171 return true; 164 return true;
172 } 165 }
173 166
174 #endif 167 #endif
OLDNEW
« no previous file with comments | « src/effects/SkTileImageFilter.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698