[M108 Migration][VD] Avoid pending frame counter becoming negative
[platform/framework/web/chromium-efl.git] / cc / tiles / raster_dark_mode_filter.h
1 // Copyright 2020 The Chromium Authors
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 CC_TILES_RASTER_DARK_MODE_FILTER_H_
6 #define CC_TILES_RASTER_DARK_MODE_FILTER_H_
7
8 #include "cc/cc_export.h"
9 #include "third_party/skia/include/core/SkColorFilter.h"
10 #include "third_party/skia/include/core/SkPixmap.h"
11
12 namespace cc {
13
14 // This class provides an interface/wrapper over blink::DarkModeFilter. The APIs
15 // in this interface are thread-safe and can be used concurrently from any
16 // thread. The interface would be created and destroyed on main thread. Derived
17 // classes should ensure making these APIs thread-safe.
18 class CC_EXPORT RasterDarkModeFilter {
19  public:
20   virtual ~RasterDarkModeFilter() = default;
21
22   // Ensure pixmap has decoded data before calling this API.
23   virtual sk_sp<SkColorFilter> ApplyToImage(const SkPixmap& pixmap,
24                                             const SkIRect& src) const = 0;
25 };
26
27 }  // namespace cc
28
29 #endif  // CC_TILES_RASTER_DARK_MODE_FILTER_H_