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

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

Issue 1553103003: remove 565 effects shaders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove more hasspan16 checks Created 4 years, 11 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/SkPictureShader.h ('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 2014 Google Inc. 2 * Copyright 2014 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 "SkPictureShader.h" 8 #include "SkPictureShader.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 SkShader::Context::ShadeProc SkPictureShader::PictureShaderContext::asAShadeProc (void** ctx) { 283 SkShader::Context::ShadeProc SkPictureShader::PictureShaderContext::asAShadeProc (void** ctx) {
284 SkASSERT(fBitmapShaderContext); 284 SkASSERT(fBitmapShaderContext);
285 return fBitmapShaderContext->asAShadeProc(ctx); 285 return fBitmapShaderContext->asAShadeProc(ctx);
286 } 286 }
287 287
288 void SkPictureShader::PictureShaderContext::shadeSpan(int x, int y, SkPMColor ds tC[], int count) { 288 void SkPictureShader::PictureShaderContext::shadeSpan(int x, int y, SkPMColor ds tC[], int count) {
289 SkASSERT(fBitmapShaderContext); 289 SkASSERT(fBitmapShaderContext);
290 fBitmapShaderContext->shadeSpan(x, y, dstC, count); 290 fBitmapShaderContext->shadeSpan(x, y, dstC, count);
291 } 291 }
292 292
293 void SkPictureShader::PictureShaderContext::shadeSpan16(int x, int y, uint16_t d stC[], int count) {
294 SkASSERT(fBitmapShaderContext);
295 fBitmapShaderContext->shadeSpan16(x, y, dstC, count);
296 }
297
298 #ifndef SK_IGNORE_TO_STRING 293 #ifndef SK_IGNORE_TO_STRING
299 void SkPictureShader::toString(SkString* str) const { 294 void SkPictureShader::toString(SkString* str) const {
300 static const char* gTileModeName[SkShader::kTileModeCount] = { 295 static const char* gTileModeName[SkShader::kTileModeCount] = {
301 "clamp", "repeat", "mirror" 296 "clamp", "repeat", "mirror"
302 }; 297 };
303 298
304 str->appendf("PictureShader: [%f:%f:%f:%f] ", 299 str->appendf("PictureShader: [%f:%f:%f:%f] ",
305 fPicture->cullRect().fLeft, 300 fPicture->cullRect().fLeft,
306 fPicture->cullRect().fTop, 301 fPicture->cullRect().fTop,
307 fPicture->cullRect().fRight, 302 fPicture->cullRect().fRight,
(...skipping 15 matching lines...) Expand all
323 if (context) { 318 if (context) {
324 maxTextureSize = context->caps()->maxTextureSize(); 319 maxTextureSize = context->caps()->maxTextureSize();
325 } 320 }
326 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix , maxTextureSize)); 321 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix , maxTextureSize));
327 if (!bitmapShader) { 322 if (!bitmapShader) {
328 return nullptr; 323 return nullptr;
329 } 324 }
330 return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq); 325 return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq);
331 } 326 }
332 #endif 327 #endif
OLDNEW
« no previous file with comments | « src/core/SkPictureShader.h ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698