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

Unified Diff: cc/ipc/render_pass_struct_traits.h

Issue 2174843003: cc mojo: Use ArrayDataViews in RenderPasses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete quads.typemap Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: cc/ipc/render_pass_struct_traits.h
diff --git a/cc/ipc/render_pass_struct_traits.h b/cc/ipc/render_pass_struct_traits.h
index 011f161fee13c03ab74143864c8808b634f484c9..f40d80280f812d4e5bbfaa024592faaf167b4a08 100644
--- a/cc/ipc/render_pass_struct_traits.h
+++ b/cc/ipc/render_pass_struct_traits.h
@@ -15,10 +15,6 @@ namespace mojo {
template <>
struct StructTraits<cc::mojom::RenderPass, std::unique_ptr<cc::RenderPass>> {
- static void* SetUpContext(const std::unique_ptr<cc::RenderPass>& input);
- static void TearDownContext(const std::unique_ptr<cc::RenderPass>& input,
- void* context);
-
static const cc::RenderPassId& id(
const std::unique_ptr<cc::RenderPass>& input) {
return input->id;
@@ -44,20 +40,10 @@ struct StructTraits<cc::mojom::RenderPass, std::unique_ptr<cc::RenderPass>> {
return input->has_transparent_background;
}
- static const cc::QuadList& quad_list(
- const std::unique_ptr<cc::RenderPass>& input) {
- return input->quad_list;
- }
-
- static const mojo::Array<uint32_t>& shared_quad_state_references(
- const std::unique_ptr<cc::RenderPass>& input,
- void* context) {
- return *static_cast<mojo::Array<uint32_t>*>(context);
- }
-
- static const cc::SharedQuadStateList& shared_quad_state_list(
+ static const QuadListArray quad_list(
const std::unique_ptr<cc::RenderPass>& input) {
- return input->shared_quad_state_list;
+ return {input->quad_list.size(),
+ const_cast<cc::QuadList*>(&input->quad_list), nullptr};
yzshen1 2016/07/28 18:25:19 why do we need a non-const pointer?
Fady Samuel 2016/07/28 19:53:31 Done.
}
static bool Read(cc::mojom::RenderPassDataView data,

Powered by Google App Engine
This is Rietveld 408576698