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

Side by Side Diff: src/gpu/SkGr.cpp

Issue 2367813002: Make GrRenderableConfigForColorSpace argument const (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | src/gpu/SkGrPriv.h » ('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 2010 Google Inc. 2 * Copyright 2010 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 8
9 #include "SkGr.h" 9 #include "SkGr.h"
10 #include "SkGrPriv.h" 10 #include "SkGrPriv.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 break; 501 break;
502 default: 502 default:
503 return false; 503 return false;
504 } 504 }
505 if (ctOut) { 505 if (ctOut) {
506 *ctOut = ct; 506 *ctOut = ct;
507 } 507 }
508 return true; 508 return true;
509 } 509 }
510 510
511 GrPixelConfig GrRenderableConfigForColorSpace(SkColorSpace* colorSpace) { 511 GrPixelConfig GrRenderableConfigForColorSpace(const SkColorSpace* colorSpace) {
512 if (!colorSpace) { 512 if (!colorSpace) {
513 return kRGBA_8888_GrPixelConfig; 513 return kRGBA_8888_GrPixelConfig;
514 } else if (colorSpace->gammaIsLinear()) { 514 } else if (colorSpace->gammaIsLinear()) {
515 return kRGBA_half_GrPixelConfig; 515 return kRGBA_half_GrPixelConfig;
516 } else if (colorSpace->gammaCloseToSRGB()) { 516 } else if (colorSpace->gammaCloseToSRGB()) {
517 return kSRGBA_8888_GrPixelConfig; 517 return kSRGBA_8888_GrPixelConfig;
518 } else { 518 } else {
519 SkDEBUGFAIL("No renderable config exists for color space with strange ga mma"); 519 SkDEBUGFAIL("No renderable config exists for color space with strange ga mma");
520 return kUnknown_GrPixelConfig; 520 return kUnknown_GrPixelConfig;
521 } 521 }
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 SkErrorInternals::SetError( kInvalidPaint_SkError, 787 SkErrorInternals::SetError( kInvalidPaint_SkError,
788 "Sorry, I don't understand the filtering " 788 "Sorry, I don't understand the filtering "
789 "mode you asked for. Falling back to " 789 "mode you asked for. Falling back to "
790 "MIPMaps."); 790 "MIPMaps.");
791 textureFilterMode = GrTextureParams::kMipMap_FilterMode; 791 textureFilterMode = GrTextureParams::kMipMap_FilterMode;
792 break; 792 break;
793 793
794 } 794 }
795 return textureFilterMode; 795 return textureFilterMode;
796 } 796 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/SkGrPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698