OLD | NEW |
(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 |
OLD | NEW |