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

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

Issue 1686803003: move compose-shader into base-class as factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « include/core/SkShader.h ('k') | no next file » | 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 if (fMode) { 245 if (fMode) {
246 str->append(" Xfermode: "); 246 str->append(" Xfermode: ");
247 fMode->toString(str); 247 fMode->toString(str);
248 } 248 }
249 249
250 this->INHERITED::toString(str); 250 this->INHERITED::toString(str);
251 251
252 str->append(")"); 252 str->append(")");
253 } 253 }
254 #endif 254 #endif
255
256 //////////////////////////////////////////////////////////////////////////////// ///////////////////
257
258 SkShader* SkShader::CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode * xfer) {
259 if (!dst || !src) {
260 return nullptr;
261 }
262 return new SkComposeShader(dst, src, xfer);
263 }
264
265 SkShader* SkShader::CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode ::Mode mode) {
266 SkAutoTUnref<SkXfermode> xfer(SkXfermode::Create(mode));
267 return CreateComposeShader(dst, src, xfer);
268 }
OLDNEW
« no previous file with comments | « include/core/SkShader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698