Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: ui/gfx/mojo/icc_profile_struct_traits.h

Issue 2663453002: Revert of Use SkICC in gfx::ICCProfile and gfx::ColorSpace (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/mojo/icc_profile.typemap ('k') | ui/gfx/mojo/icc_profile_struct_traits.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 UI_GFX_MOJO_ICC_PROFILE_STRUCT_TRAITS_H_
6 #define UI_GFX_MOJO_ICC_PROFILE_STRUCT_TRAITS_H_
7
8 #include <algorithm>
9 #include <memory>
10
11 #include "base/strings/string_piece.h"
12 #include "mojo/public/cpp/bindings/struct_traits.h"
13 #include "ui/gfx/icc_profile.h"
14 #include "ui/gfx/ipc/color/gfx_param_traits.h"
15 #include "ui/gfx/mojo/icc_profile.mojom.h"
16
17 namespace mojo {
18
19 template <>
20 struct StructTraits<gfx::mojom::ICCProfileDataView, gfx::ICCProfile> {
21 static gfx::ICCProfile::Type type(const gfx::ICCProfile& profile) {
22 return profile.type_;
23 }
24 static gfx::ColorSpace color_space(const gfx::ICCProfile& profile) {
25 return profile.color_space_;
26 }
27 static base::StringPiece data(const gfx::ICCProfile& profile) {
28 return base::StringPiece(profile.data_.data(), profile.data_.size());
29 }
30 static uint64_t id(const gfx::ICCProfile& profile) { return profile.id_; }
31
32 static bool Read(gfx::mojom::ICCProfileDataView data,
33 gfx::ICCProfile* profile);
34 };
35
36 } // namespace mojo
37
38 #endif // UI_GFX_MOJO_ICC_PROFILE_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « ui/gfx/mojo/icc_profile.typemap ('k') | ui/gfx/mojo/icc_profile_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698