summaryrefslogtreecommitdiffstats
path: root/chromium/ui/gfx/color_profile.h
blob: 20a02bf169ff0cf621302ad92e514a66eb2d9f4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_GFX_COLOR_PROFILE_H_
#define UI_GFX_COLOR_PROFILE_H_

#include <vector>

#include "base/basictypes.h"

#include "ui/gfx/gfx_export.h"

namespace gfx {

static const size_t kMinProfileLength = 128;
static const size_t kMaxProfileLength = 4 * 1024 * 1024;

class GFX_EXPORT ColorProfile {
 public:
  // On Windows, this reads a file from disk so it shouldn't be run on the UI
  // or IO thread.
  ColorProfile();
  ~ColorProfile();

  const std::vector<char>& profile() const { return profile_; }

 private:
  std::vector<char> profile_;

  DISALLOW_COPY_AND_ASSIGN(ColorProfile);
};

// Loads the monitor color space if available.
GFX_EXPORT void GetColorProfile(std::vector<char>* profile);

}  // namespace gfx

#endif  // UI_GFX_COLOR_PROFILE_H_