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

Unified Diff: tools/viewer/sk_app/android/Window_android.cpp

Issue 1950983007: Add sRGB mode toggle to Viewer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: tools/viewer/sk_app/android/Window_android.cpp
diff --git a/tools/viewer/sk_app/android/Window_android.cpp b/tools/viewer/sk_app/android/Window_android.cpp
index 94be02c9336acc1493834c06918dad40ada2bfa7..f2ece45c9816bfb2ab8eb7e53ad58f7ca6b7e387 100644
--- a/tools/viewer/sk_app/android/Window_android.cpp
+++ b/tools/viewer/sk_app/android/Window_android.cpp
@@ -37,12 +37,13 @@ void Window_android::setTitle(const char* title) {
SkDebugf("Title: %s", title);
}
-bool Window_android::attach(BackEndType attachType, int msaaSampleCount) {
+bool Window_android::attach(BackEndType attachType, int msaaSampleCount, bool srgb) {
if (kVulkan_BackendType != attachType) {
return false;
}
mSampleCount = msaaSampleCount;
+ mSRGB = srgb;
// We delay the creation of fTestContext until Android informs us that
// the native window is ready to use.
@@ -53,7 +54,7 @@ void Window_android::initDisplay(ANativeWindow* window) {
SkASSERT(window);
ContextPlatformData_android platformData;
platformData.fNativeWindow = window;
- fWindowContext = VulkanWindowContext::Create((void*)&platformData, mSampleCount);
+ fWindowContext = VulkanWindowContext::Create((void*)&platformData, mSampleCount, mSRGB);
}
static void android_app_write_cmd(struct android_app* android_app, int8_t cmd) {

Powered by Google App Engine
This is Rietveld 408576698