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

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

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix CanvasRenderingContext2D::createPattern crash for #40 Created 4 years, 11 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/GraphicsScreen.h
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsScreen.h b/third_party/WebKit/Source/platform/graphics/GraphicsScreen.h
new file mode 100644
index 0000000000000000000000000000000000000000..40d2b6870260e36088a7d4e2e60b1cd969125c12
--- /dev/null
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsScreen.h
@@ -0,0 +1,46 @@
+// Copyright 2015 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 GraphicsScreen_h
+#define GraphicsScreen_h
+
+#include "platform/graphics/ColorSpaceFilterCache.h"
+
+namespace blink {
+
+class ColorSpaceProfile;
+
+PLATFORM_EXPORT uintptr_t setCurrentScreenId(uintptr_t);
+PLATFORM_EXPORT uintptr_t currentScreenId();
+
+PLATFORM_EXPORT PassRefPtr<ColorSpaceProfile> screenColorProfile(uintptr_t);
+PLATFORM_EXPORT void setScreenColorProfile(uintptr_t, const char* profile, size_t);
+PLATFORM_EXPORT void removeScreenColorProfile(uintptr_t);
+
+PLATFORM_EXPORT bool imageColorProfilesEnabled();
+
+class PLATFORM_EXPORT WillPaintForDevice {
+public:
+ WillPaintForDevice(uintptr_t screenId) : m_currentId(screenId)
+ {
+ m_restoreId = setCurrentScreenId(m_currentId);
+ }
+
+ ~WillPaintForDevice()
+ {
+ didPaintForDevice();
+ }
+
+ void didPaintForDevice()
+ {
+ setCurrentScreenId(m_restoreId);
+ }
+
+ uintptr_t m_currentId;
+ uintptr_t m_restoreId;
+};
+
+} // namespace blink
+
+#endif // GraphicsScreen_h

Powered by Google App Engine
This is Rietveld 408576698