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

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

Issue 1152563003: Further work on sRGB support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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/gl/GrGLDefines.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 #include "SkGr.h" 8 #include "SkGr.h"
9 9
10 #include "GrXferProcessor.h" 10 #include "GrXferProcessor.h"
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 switch (ct) { 583 switch (ct) {
584 case kUnknown_SkColorType: 584 case kUnknown_SkColorType:
585 return kUnknown_GrPixelConfig; 585 return kUnknown_GrPixelConfig;
586 case kAlpha_8_SkColorType: 586 case kAlpha_8_SkColorType:
587 return kAlpha_8_GrPixelConfig; 587 return kAlpha_8_GrPixelConfig;
588 case kRGB_565_SkColorType: 588 case kRGB_565_SkColorType:
589 return kRGB_565_GrPixelConfig; 589 return kRGB_565_GrPixelConfig;
590 case kARGB_4444_SkColorType: 590 case kARGB_4444_SkColorType:
591 return kRGBA_4444_GrPixelConfig; 591 return kRGBA_4444_GrPixelConfig;
592 case kRGBA_8888_SkColorType: 592 case kRGBA_8888_SkColorType:
593 // if (kSRGB_SkColorProfileType == pt) { 593 //if (kSRGB_SkColorProfileType == pt) {
594 // return kSRGBA_8888_GrPixelConfig; 594 // return kSRGBA_8888_GrPixelConfig;
595 // } 595 //}
596 return kRGBA_8888_GrPixelConfig; 596 return kRGBA_8888_GrPixelConfig;
597 case kBGRA_8888_SkColorType: 597 case kBGRA_8888_SkColorType:
598 return kBGRA_8888_GrPixelConfig; 598 return kBGRA_8888_GrPixelConfig;
599 case kIndex_8_SkColorType: 599 case kIndex_8_SkColorType:
600 return kIndex_8_GrPixelConfig; 600 return kIndex_8_GrPixelConfig;
601 case kGray_8_SkColorType: 601 case kGray_8_SkColorType:
602 return kAlpha_8_GrPixelConfig; // TODO: gray8 support on gpu 602 return kAlpha_8_GrPixelConfig; // TODO: gray8 support on gpu
603 } 603 }
604 SkASSERT(0); // shouldn't get here 604 SkASSERT(0); // shouldn't get here
605 return kUnknown_GrPixelConfig; 605 return kUnknown_GrPixelConfig;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } 753 }
754 return SkImageInfo::Make(w, h, ct, at); 754 return SkImageInfo::Make(w, h, ct, at);
755 } 755 }
756 756
757 757
758 void GrWrapTextureInBitmap(GrTexture* src, int w, int h, bool isOpaque, SkBitmap * dst) { 758 void GrWrapTextureInBitmap(GrTexture* src, int w, int h, bool isOpaque, SkBitmap * dst) {
759 const SkImageInfo info = GrMakeInfoFromTexture(src, w, h, isOpaque); 759 const SkImageInfo info = GrMakeInfoFromTexture(src, w, h, isOpaque);
760 dst->setInfo(info); 760 dst->setInfo(info);
761 dst->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, src)))->unref(); 761 dst->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, src)))->unref();
762 } 762 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698