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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GraphicsScreen_h
6 #define GraphicsScreen_h
7
8 #include "platform/graphics/ColorSpaceFilterCache.h"
9
10 namespace blink {
11
12 class ColorSpaceProfile;
13
14 PLATFORM_EXPORT uintptr_t setCurrentScreenId(uintptr_t);
15 PLATFORM_EXPORT uintptr_t currentScreenId();
16
17 PLATFORM_EXPORT PassRefPtr<ColorSpaceProfile> screenColorProfile(uintptr_t);
18 PLATFORM_EXPORT void setScreenColorProfile(uintptr_t, const char* profile, size_ t);
19 PLATFORM_EXPORT void removeScreenColorProfile(uintptr_t);
20
21 PLATFORM_EXPORT bool imageColorProfilesEnabled();
22
23 class PLATFORM_EXPORT WillPaintForDevice {
24 public:
25 WillPaintForDevice(uintptr_t screenId) : m_currentId(screenId)
26 {
27 m_restoreId = setCurrentScreenId(m_currentId);
28 }
29
30 ~WillPaintForDevice()
31 {
32 didPaintForDevice();
33 }
34
35 void didPaintForDevice()
36 {
37 setCurrentScreenId(m_restoreId);
38 }
39
40 uintptr_t m_currentId;
41 uintptr_t m_restoreId;
42 };
43
44 } // namespace blink
45
46 #endif // GraphicsScreen_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698