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

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

Issue 817373002: Disable GPU sRGB textures for the moment. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase to ToT Created 6 years 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 | 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 * 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 #include "SkGr.h" 8 #include "SkGr.h"
9 9
10 #include "GrDrawTargetCaps.h" 10 #include "GrDrawTargetCaps.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 switch (ct) { 430 switch (ct) {
431 case kUnknown_SkColorType: 431 case kUnknown_SkColorType:
432 return kUnknown_GrPixelConfig; 432 return kUnknown_GrPixelConfig;
433 case kAlpha_8_SkColorType: 433 case kAlpha_8_SkColorType:
434 return kAlpha_8_GrPixelConfig; 434 return kAlpha_8_GrPixelConfig;
435 case kRGB_565_SkColorType: 435 case kRGB_565_SkColorType:
436 return kRGB_565_GrPixelConfig; 436 return kRGB_565_GrPixelConfig;
437 case kARGB_4444_SkColorType: 437 case kARGB_4444_SkColorType:
438 return kRGBA_4444_GrPixelConfig; 438 return kRGBA_4444_GrPixelConfig;
439 case kRGBA_8888_SkColorType: 439 case kRGBA_8888_SkColorType:
440 if (kSRGB_SkColorProfileType == pt) { 440 // if (kSRGB_SkColorProfileType == pt) {
441 return kSRGBA_8888_GrPixelConfig; 441 // return kSRGBA_8888_GrPixelConfig;
442 } 442 // }
443 return kRGBA_8888_GrPixelConfig; 443 return kRGBA_8888_GrPixelConfig;
444 case kBGRA_8888_SkColorType: 444 case kBGRA_8888_SkColorType:
445 return kBGRA_8888_GrPixelConfig; 445 return kBGRA_8888_GrPixelConfig;
446 case kIndex_8_SkColorType: 446 case kIndex_8_SkColorType:
447 return kIndex_8_GrPixelConfig; 447 return kIndex_8_GrPixelConfig;
448 } 448 }
449 SkASSERT(0); // shouldn't get here 449 SkASSERT(0); // shouldn't get here
450 return kUnknown_GrPixelConfig; 450 return kUnknown_GrPixelConfig;
451 } 451 }
452 452
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 if (shader->asFragmentProcessor(context, skPaint, viewM, NULL, &paintCol or, &fp) && fp) { 581 if (shader->asFragmentProcessor(context, skPaint, viewM, NULL, &paintCol or, &fp) && fp) {
582 grPaint->addColorProcessor(fp)->unref(); 582 grPaint->addColorProcessor(fp)->unref();
583 constantColor = false; 583 constantColor = false;
584 } 584 }
585 } 585 }
586 586
587 // The grcolor is automatically set when calling asFragmentProcessor. 587 // The grcolor is automatically set when calling asFragmentProcessor.
588 // If the shader can be seen as an effect it returns true and adds its effec t to the grpaint. 588 // If the shader can be seen as an effect it returns true and adds its effec t to the grpaint.
589 SkPaint2GrPaintNoShader(context, skPaint, paintColor, constantColor, grPaint ); 589 SkPaint2GrPaintNoShader(context, skPaint, paintColor, constantColor, grPaint );
590 } 590 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698