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

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

Issue 221923007: Initial picture shader implementation (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Remove unneeded suppression. Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 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 "SkBitmapProcShader.h" 8 #include "SkBitmapProcShader.h"
9 #include "SkReadBuffer.h" 9 #include "SkReadBuffer.h"
10 #include "SkMallocPixelRef.h" 10 #include "SkMallocPixelRef.h"
11 #include "SkPaint.h" 11 #include "SkPaint.h"
12 #include "SkPicture.h"
13 #include "SkPictureShader.h"
12 #include "SkScalar.h" 14 #include "SkScalar.h"
13 #include "SkShader.h" 15 #include "SkShader.h"
14 #include "SkWriteBuffer.h" 16 #include "SkWriteBuffer.h"
15 17
16 SkShader::SkShader() { 18 SkShader::SkShader() {
17 fLocalMatrix.reset(); 19 fLocalMatrix.reset();
18 SkDEBUGCODE(fInSetContext = false;) 20 SkDEBUGCODE(fInSetContext = false;)
19 } 21 }
20 22
21 SkShader::SkShader(SkReadBuffer& buffer) 23 SkShader::SkShader(SkReadBuffer& buffer)
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 174
173 GrEffectRef* SkShader::asNewEffect(GrContext*, const SkPaint&) const { 175 GrEffectRef* SkShader::asNewEffect(GrContext*, const SkPaint&) const {
174 return NULL; 176 return NULL;
175 } 177 }
176 178
177 SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, 179 SkShader* SkShader::CreateBitmapShader(const SkBitmap& src,
178 TileMode tmx, TileMode tmy) { 180 TileMode tmx, TileMode tmy) {
179 return ::CreateBitmapShader(src, tmx, tmy, NULL); 181 return ::CreateBitmapShader(src, tmx, tmy, NULL);
180 } 182 }
181 183
184 SkShader* SkShader::CreatePictureShader(SkPicture* src, TileMode tmx, TileMode t my) {
185 return SkPictureShader::Create(src, tmx, tmy);
186 }
187
182 #ifndef SK_IGNORE_TO_STRING 188 #ifndef SK_IGNORE_TO_STRING
183 void SkShader::toString(SkString* str) const { 189 void SkShader::toString(SkString* str) const {
184 if (this->hasLocalMatrix()) { 190 if (this->hasLocalMatrix()) {
185 str->append(" "); 191 str->append(" ");
186 this->getLocalMatrix().toString(str); 192 this->getLocalMatrix().toString(str);
187 } 193 }
188 } 194 }
189 #endif 195 #endif
190 196
191 ////////////////////////////////////////////////////////////////////////////// 197 //////////////////////////////////////////////////////////////////////////////
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 356
351 #ifndef SK_IGNORE_TO_STRING 357 #ifndef SK_IGNORE_TO_STRING
352 void SkEmptyShader::toString(SkString* str) const { 358 void SkEmptyShader::toString(SkString* str) const {
353 str->append("SkEmptyShader: ("); 359 str->append("SkEmptyShader: (");
354 360
355 this->INHERITED::toString(str); 361 this->INHERITED::toString(str);
356 362
357 str->append(")"); 363 str->append(")");
358 } 364 }
359 #endif 365 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698