1 // Copyright 2019 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 THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_DARK_MODE_COLOR_FILTER_H_
6 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_DARK_MODE_COLOR_FILTER_H_
7 
8 #include <memory>
9 
10 #include "third_party/blink/renderer/platform/graphics/color.h"
11 #include "third_party/blink/renderer/platform/graphics/dark_mode_settings.h"
12 #include "third_party/blink/renderer/platform/graphics/lab_color_space.h"
13 #include "third_party/blink/renderer/platform/platform_export.h"
14 #include "third_party/skia/include/core/SkRefCnt.h"
15 
16 class SkColorFilter;
17 
18 namespace blink {
19 
20 // Contains logic specific to modifying colors drawn when dark mode is active.
21 class PLATFORM_EXPORT DarkModeColorFilter {
22  public:
23   static std::unique_ptr<DarkModeColorFilter> FromSettings(
24       const DarkModeSettings& settings);
25 
26   virtual ~DarkModeColorFilter();
27   virtual Color InvertColor(const Color& color) const = 0;
28   virtual sk_sp<SkColorFilter> ToSkColorFilter() const = 0;
29 };
30 
31 }  // namespace blink
32 
33 #endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_DARK_MODE_COLOR_FILTER_H_
34