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

Side by Side Diff: src/core/SkComposeShader.cpp

Issue 245963010: Move SkShader::fLocalMatrix into SkShader constructor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 6 years, 7 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/core/SkBitmapProcShader.cpp ('k') | src/core/SkDraw.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkComposeShader.h" 10 #include "SkComposeShader.h"
(...skipping 12 matching lines...) Expand all
23 fShaderB = sB; sB->ref(); 23 fShaderB = sB; sB->ref();
24 // mode may be null 24 // mode may be null
25 fMode = mode; 25 fMode = mode;
26 SkSafeRef(mode); 26 SkSafeRef(mode);
27 } 27 }
28 28
29 SkComposeShader::SkComposeShader(SkReadBuffer& buffer) : 29 SkComposeShader::SkComposeShader(SkReadBuffer& buffer) :
30 INHERITED(buffer) { 30 INHERITED(buffer) {
31 fShaderA = buffer.readShader(); 31 fShaderA = buffer.readShader();
32 if (NULL == fShaderA) { 32 if (NULL == fShaderA) {
33 fShaderA = SkNEW_ARGS(SkColorShader, (0)); 33 fShaderA = SkNEW_ARGS(SkColorShader, ((SkColor)0));
34 } 34 }
35 fShaderB = buffer.readShader(); 35 fShaderB = buffer.readShader();
36 if (NULL == fShaderB) { 36 if (NULL == fShaderB) {
37 fShaderB = SkNEW_ARGS(SkColorShader, (0)); 37 fShaderB = SkNEW_ARGS(SkColorShader, ((SkColor)0));
38 } 38 }
39 fMode = buffer.readXfermode(); 39 fMode = buffer.readXfermode();
40 } 40 }
41 41
42 SkComposeShader::~SkComposeShader() { 42 SkComposeShader::~SkComposeShader() {
43 SkSafeUnref(fMode); 43 SkSafeUnref(fMode);
44 fShaderB->unref(); 44 fShaderB->unref();
45 fShaderA->unref(); 45 fShaderA->unref();
46 } 46 }
47 47
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 str->append(" ShaderB: "); 212 str->append(" ShaderB: ");
213 fShaderB->toString(str); 213 fShaderB->toString(str);
214 str->append(" Xfermode: "); 214 str->append(" Xfermode: ");
215 fMode->toString(str); 215 fMode->toString(str);
216 216
217 this->INHERITED::toString(str); 217 this->INHERITED::toString(str);
218 218
219 str->append(")"); 219 str->append(")");
220 } 220 }
221 #endif 221 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698