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

Unified Diff: third_party/WebKit/Source/platform/graphics/HighContrastSettings.h

Issue 2878573003: Initial skeleton of high-contrast mode. (Closed)
Patch Set: Rebase Created 3 years, 6 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: third_party/WebKit/Source/platform/graphics/HighContrastSettings.h
diff --git a/third_party/WebKit/Source/platform/graphics/HighContrastSettings.h b/third_party/WebKit/Source/platform/graphics/HighContrastSettings.h
new file mode 100644
index 0000000000000000000000000000000000000000..0d5ad2f9a6d507dc56e46ba5ac1a56008e7f35b2
--- /dev/null
+++ b/third_party/WebKit/Source/platform/graphics/HighContrastSettings.h
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef HighContrastSettings_h
+#define HighContrastSettings_h
+
+namespace blink {
+
+enum class HighContrastMode {
+ // Default, drawing is unfiltered.
+ kOff,
+ // For testing only, does a simple 8-bit invert of every RGB pixel component.
+ kSimpleInvertForTesting,
+ kInvertBrightness,
+ kInvertLightness,
+};
+
+struct HighContrastSettings {
+ HighContrastMode mode = HighContrastMode::kOff;
+ bool grayscale = false;
+ float contrast = 0.0; // Valid range from -1.0 to 1.0
+};
+
+} // namespace blink
+
+#endif // HighContrastSettings_h

Powered by Google App Engine
This is Rietveld 408576698