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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 2177193004: Always supply a color space (sRGB for now) with F16 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix uploading of F16 textures with color spaces Created 4 years, 4 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 | « dm/DM.cpp ('k') | src/gpu/SkGr.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 2011 Google Inc. 2 * Copyright 2011 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 "SampleApp.h" 8 #include "SampleApp.h"
9 9
10 #include "OverView.h" 10 #include "OverView.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 class GrContext; 46 class GrContext;
47 #endif 47 #endif
48 48
49 const struct { 49 const struct {
50 SkColorType fColorType; 50 SkColorType fColorType;
51 bool fSRGB; 51 bool fSRGB;
52 const char* fName; 52 const char* fName;
53 } gConfig[] = { 53 } gConfig[] = {
54 { kN32_SkColorType, false, "L32" }, 54 { kN32_SkColorType, false, "L32" },
55 { kN32_SkColorType, true, "S32" }, 55 { kN32_SkColorType, true, "S32" },
56 { kRGBA_F16_SkColorType, false, "F16" }, 56 { kRGBA_F16_SkColorType, true, "F16" },
57 }; 57 };
58 58
59 static const char* find_config_name(const SkImageInfo& info) { 59 static const char* find_config_name(const SkImageInfo& info) {
60 for (const auto& config : gConfig) { 60 for (const auto& config : gConfig) {
61 if (config.fColorType == info.colorType() && 61 if (config.fColorType == info.colorType() &&
62 config.fSRGB == (info.colorSpace() != nullptr)) { 62 config.fSRGB == (info.colorSpace() != nullptr)) {
63 return config.fName; 63 return config.fName;
64 } 64 }
65 } 65 }
66 return "???"; 66 return "???";
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2253 #ifdef SK_BUILD_FOR_MAC 2253 #ifdef SK_BUILD_FOR_MAC
2254 setenv("ANDROID_ROOT", "/android/device/data", 0); 2254 setenv("ANDROID_ROOT", "/android/device/data", 0);
2255 #endif 2255 #endif
2256 SkGraphics::Init(); 2256 SkGraphics::Init();
2257 SkEvent::Init(); 2257 SkEvent::Init();
2258 } 2258 }
2259 2259
2260 void application_term() { 2260 void application_term() {
2261 SkEvent::Term(); 2261 SkEvent::Term();
2262 } 2262 }
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698