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

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

Issue 23478013: Major bench refactoring. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: scroggo Created 7 years, 3 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 #include "SkBitmapProcShader.h" 8 #include "SkBitmapProcShader.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkFlattenableBuffers.h" 10 #include "SkFlattenableBuffers.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 case SkPaint::kNone_FilterLevel: 360 case SkPaint::kNone_FilterLevel:
361 textureFilterMode = GrTextureParams::kNone_FilterMode; 361 textureFilterMode = GrTextureParams::kNone_FilterMode;
362 break; 362 break;
363 case SkPaint::kLow_FilterLevel: 363 case SkPaint::kLow_FilterLevel:
364 textureFilterMode = GrTextureParams::kBilerp_FilterMode; 364 textureFilterMode = GrTextureParams::kBilerp_FilterMode;
365 break; 365 break;
366 case SkPaint::kMedium_FilterLevel: 366 case SkPaint::kMedium_FilterLevel:
367 textureFilterMode = GrTextureParams::kMipMap_FilterMode; 367 textureFilterMode = GrTextureParams::kMipMap_FilterMode;
368 break; 368 break;
369 case SkPaint::kHigh_FilterLevel: 369 case SkPaint::kHigh_FilterLevel:
370 /*
epoger 2013/09/04 14:36:40 Why is this file part of this CL?
370 SkErrorInternals::SetError( kInvalidPaint_SkError, 371 SkErrorInternals::SetError( kInvalidPaint_SkError,
371 "Sorry, I don't yet support high quality " 372 "Sorry, I don't yet support high quality "
372 "filtering on the GPU; falling back to " 373 "filtering on the GPU; falling back to "
373 "MIPMaps."); 374 "MIPMaps.");
375 */
374 textureFilterMode = GrTextureParams::kMipMap_FilterMode; 376 textureFilterMode = GrTextureParams::kMipMap_FilterMode;
375 break; 377 break;
376 default: 378 default:
377 SkErrorInternals::SetError( kInvalidPaint_SkError, 379 SkErrorInternals::SetError( kInvalidPaint_SkError,
378 "Sorry, I don't understand the filtering " 380 "Sorry, I don't understand the filtering "
379 "mode you asked for. Falling back to " 381 "mode you asked for. Falling back to "
380 "MIPMaps."); 382 "MIPMaps.");
381 textureFilterMode = GrTextureParams::kMipMap_FilterMode; 383 textureFilterMode = GrTextureParams::kMipMap_FilterMode;
382 break; 384 break;
383 385
384 } 386 }
385 GrTextureParams params(tm, textureFilterMode); 387 GrTextureParams params(tm, textureFilterMode);
386 GrTexture* texture = GrLockAndRefCachedBitmapTexture(context, fRawBitmap, &p arams); 388 GrTexture* texture = GrLockAndRefCachedBitmapTexture(context, fRawBitmap, &p arams);
387 389
388 if (NULL == texture) { 390 if (NULL == texture) {
389 SkDebugf("Couldn't convert bitmap to texture.\n"); 391 SkDebugf("Couldn't convert bitmap to texture.\n");
390 return NULL; 392 return NULL;
391 } 393 }
392 394
393 GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix, params) ; 395 GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix, params) ;
394 GrUnlockAndUnrefCachedBitmapTexture(texture); 396 GrUnlockAndUnrefCachedBitmapTexture(texture);
395 return effect; 397 return effect;
396 } 398 }
397 #endif 399 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698