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

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

Issue 1666343002: add kRGBA_F16_SkColorType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add unittest Created 4 years, 10 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/SkPixmap.cpp ('k') | tests/Float16Test.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 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 10
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 //if (kSRGB_SkColorProfileType == pt) { 311 //if (kSRGB_SkColorProfileType == pt) {
312 // return kSRGBA_8888_GrPixelConfig; 312 // return kSRGBA_8888_GrPixelConfig;
313 //} 313 //}
314 return kRGBA_8888_GrPixelConfig; 314 return kRGBA_8888_GrPixelConfig;
315 case kBGRA_8888_SkColorType: 315 case kBGRA_8888_SkColorType:
316 return kBGRA_8888_GrPixelConfig; 316 return kBGRA_8888_GrPixelConfig;
317 case kIndex_8_SkColorType: 317 case kIndex_8_SkColorType:
318 return kIndex_8_GrPixelConfig; 318 return kIndex_8_GrPixelConfig;
319 case kGray_8_SkColorType: 319 case kGray_8_SkColorType:
320 return kAlpha_8_GrPixelConfig; // TODO: gray8 support on gpu 320 return kAlpha_8_GrPixelConfig; // TODO: gray8 support on gpu
321 case kRGBA_F16_SkColorType:
322 return kRGBA_half_GrPixelConfig;
321 } 323 }
322 SkASSERT(0); // shouldn't get here 324 SkASSERT(0); // shouldn't get here
323 return kUnknown_GrPixelConfig; 325 return kUnknown_GrPixelConfig;
324 } 326 }
325 327
326 bool GrPixelConfig2ColorAndProfileType(GrPixelConfig config, SkColorType* ctOut, 328 bool GrPixelConfig2ColorAndProfileType(GrPixelConfig config, SkColorType* ctOut,
327 SkColorProfileType* ptOut) { 329 SkColorProfileType* ptOut) {
328 SkColorType ct; 330 SkColorType ct;
329 SkColorProfileType pt = kLinear_SkColorProfileType; 331 SkColorProfileType pt = kLinear_SkColorProfileType;
330 switch (config) { 332 switch (config) {
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 SkErrorInternals::SetError( kInvalidPaint_SkError, 629 SkErrorInternals::SetError( kInvalidPaint_SkError,
628 "Sorry, I don't understand the filtering " 630 "Sorry, I don't understand the filtering "
629 "mode you asked for. Falling back to " 631 "mode you asked for. Falling back to "
630 "MIPMaps."); 632 "MIPMaps.");
631 textureFilterMode = GrTextureParams::kMipMap_FilterMode; 633 textureFilterMode = GrTextureParams::kMipMap_FilterMode;
632 break; 634 break;
633 635
634 } 636 }
635 return textureFilterMode; 637 return textureFilterMode;
636 } 638 }
OLDNEW
« no previous file with comments | « src/core/SkPixmap.cpp ('k') | tests/Float16Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698