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

Side by Side Diff: cc/ipc/render_pass_struct_traits.h

Issue 2693723002: cc: Move output color space from DrawingFrame to RenderPass (Closed)
Patch Set: Fix typo Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_ 5 #ifndef CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_
6 #define CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_ 6 #define CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/ipc/quads_struct_traits.h" 9 #include "cc/ipc/quads_struct_traits.h"
10 #include "cc/ipc/render_pass.mojom-shared.h" 10 #include "cc/ipc/render_pass.mojom-shared.h"
11 #include "cc/quads/render_pass.h" 11 #include "cc/quads/render_pass.h"
12 #include "ui/gfx/ipc/color/gfx_param_traits.h"
12 #include "ui/gfx/mojo/transform_struct_traits.h" 13 #include "ui/gfx/mojo/transform_struct_traits.h"
13 14
14 namespace mojo { 15 namespace mojo {
15 16
16 template <> 17 template <>
17 struct StructTraits<cc::mojom::RenderPassDataView, 18 struct StructTraits<cc::mojom::RenderPassDataView,
18 std::unique_ptr<cc::RenderPass>> { 19 std::unique_ptr<cc::RenderPass>> {
19 static int32_t id(const std::unique_ptr<cc::RenderPass>& input) { 20 static int32_t id(const std::unique_ptr<cc::RenderPass>& input) {
20 DCHECK(input->id); 21 DCHECK(input->id);
21 return input->id; 22 return input->id;
(...skipping 17 matching lines...) Expand all
39 static const cc::FilterOperations& filters( 40 static const cc::FilterOperations& filters(
40 const std::unique_ptr<cc::RenderPass>& input) { 41 const std::unique_ptr<cc::RenderPass>& input) {
41 return input->filters; 42 return input->filters;
42 } 43 }
43 44
44 static const cc::FilterOperations& background_filters( 45 static const cc::FilterOperations& background_filters(
45 const std::unique_ptr<cc::RenderPass>& input) { 46 const std::unique_ptr<cc::RenderPass>& input) {
46 return input->background_filters; 47 return input->background_filters;
47 } 48 }
48 49
50 static const gfx::ColorSpace& color_space(
51 const std::unique_ptr<cc::RenderPass>& input) {
52 return input->color_space;
53 }
54
49 static bool has_transparent_background( 55 static bool has_transparent_background(
50 const std::unique_ptr<cc::RenderPass>& input) { 56 const std::unique_ptr<cc::RenderPass>& input) {
51 return input->has_transparent_background; 57 return input->has_transparent_background;
52 } 58 }
53 59
54 static const cc::QuadList& quad_list( 60 static const cc::QuadList& quad_list(
55 const std::unique_ptr<cc::RenderPass>& input) { 61 const std::unique_ptr<cc::RenderPass>& input) {
56 return input->quad_list; 62 return input->quad_list;
57 } 63 }
58 64
59 static bool Read(cc::mojom::RenderPassDataView data, 65 static bool Read(cc::mojom::RenderPassDataView data,
60 std::unique_ptr<cc::RenderPass>* out); 66 std::unique_ptr<cc::RenderPass>* out);
61 }; 67 };
62 68
63 } // namespace mojo 69 } // namespace mojo
64 70
65 #endif // CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_ 71 #endif // CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698