[M73 Dev][EFL] Disable VizDisplayCompositor for EFL port
[platform/framework/web/chromium-efl.git] / components / favicon_base / fallback_icon_style.h
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 COMPONENTS_FAVICON_BASE_FALLBACK_ICON_STYLE_H_
6 #define COMPONENTS_FAVICON_BASE_FALLBACK_ICON_STYLE_H_
7
8 #include "base/memory/ref_counted_memory.h"
9 #include "third_party/skia/include/core/SkColor.h"
10
11 namespace favicon_base {
12
13 // Styling specifications of a fallback icon. The icon is composed of a solid
14 // rounded square containing a single letter. The specification excludes the
15 // icon URL and size, which are given when the icon is rendered.
16 struct FallbackIconStyle {
17   FallbackIconStyle();
18   ~FallbackIconStyle();
19
20   // Icon background fill color.
21   SkColor background_color;
22   bool is_default_background_color;
23
24   // Icon text color.
25   SkColor text_color;
26
27   bool operator==(const FallbackIconStyle& other) const;
28 };
29
30 // Set |style|'s background color to the dominant color of |bitmap_data|,
31 // clamping luminance down to a reasonable maximum value so that light text is
32 // readable.
33 void SetDominantColorAsBackground(
34     const scoped_refptr<base::RefCountedMemory>& bitmap_data,
35     FallbackIconStyle* style);
36
37 }  // namespace favicon_base
38
39 #endif  // COMPONENTS_FAVICON_BASE_FALLBACK_ICON_STYLE_H_