Index: samplecode/SampleApp.cpp |
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
index 9e7e651b1c6e91400e78fa1031fdf1f00cb49110..580747eb171d8c3243ffb6a8fdb0585e68fc7c7d 100644 |
--- a/samplecode/SampleApp.cpp |
+++ b/samplecode/SampleApp.cpp |
@@ -53,7 +53,7 @@ const struct { |
} gConfig[] = { |
{ kN32_SkColorType, false, "L32" }, |
{ kN32_SkColorType, true, "S32" }, |
- { kRGBA_F16_SkColorType, true, "F16" }, |
+// { kRGBA_F16_SkColorType, true, "F16" }, |
}; |
static const char* find_config_name(const SkImageInfo& info) { |
@@ -857,7 +857,7 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev |
int itemID; |
itemID = fAppMenu->appendList("ColorType", "ColorType", sinkID, 0, |
- gConfig[0].fName, gConfig[1].fName, gConfig[2].fName, nullptr); |
+ gConfig[0].fName, gConfig[1].fName, nullptr); |
fAppMenu->assignKeyEquivalentToItem(itemID, 'C'); |
itemID = fAppMenu->appendList("Device Type", "Device Type", sinkID, 0, |
@@ -1059,6 +1059,25 @@ void SampleWindow::draw(SkCanvas* canvas) { |
} |
} |
+ { |
+ int count = canvas->save(); |
+ canvas->resetMatrix(); |
+ SkPaint p; |
+ p.setTextSize(36); |
+ p.setColor(0xFFFFFFFF); |
+ SkPaint p2; |
+ p2.setTextSize(36); |
+ p2.setColor(0xFF000000); |
+ if (SkImageInfoIsGammaCorrect(info())) { |
+ canvas->drawText("Gamma Correct: Yes", 18, 50, 900, p); |
+ canvas->drawText("Gamma Correct: Yes", 18, 50, 850, p2); |
+ } else { |
+ canvas->drawText("Gamma Correct: No", 17, 50, 900, p); |
+ canvas->drawText("Gamma Correct: No", 17, 50, 850, p2); |
+ } |
+ canvas->restoreToCount(count); |
+ } |
+ |
if (fShowZoomer && !fSaveToPdf) { |
showZoomer(canvas); |
} |