| OLD | NEW |
| 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 #include "cc/ipc/quads_struct_traits.h" | 5 #include "cc/ipc/quads_struct_traits.h" |
| 6 #include "ui/gfx/mojo/transform_struct_traits.h" | 6 #include "ui/gfx/mojo/transform_struct_traits.h" |
| 7 | 7 |
| 8 namespace mojo { | 8 namespace mojo { |
| 9 | 9 |
| 10 cc::DrawQuad* AllocateAndConstruct( | 10 cc::DrawQuad* AllocateAndConstruct( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 bool StructTraits<cc::mojom::RenderPassQuadStateDataView, cc::DrawQuad>::Read( | 63 bool StructTraits<cc::mojom::RenderPassQuadStateDataView, cc::DrawQuad>::Read( |
| 64 cc::mojom::RenderPassQuadStateDataView data, | 64 cc::mojom::RenderPassQuadStateDataView data, |
| 65 cc::DrawQuad* out) { | 65 cc::DrawQuad* out) { |
| 66 cc::RenderPassDrawQuad* quad = static_cast<cc::RenderPassDrawQuad*>(out); | 66 cc::RenderPassDrawQuad* quad = static_cast<cc::RenderPassDrawQuad*>(out); |
| 67 quad->resources.ids[cc::RenderPassDrawQuad::kMaskResourceIdIndex] = | 67 quad->resources.ids[cc::RenderPassDrawQuad::kMaskResourceIdIndex] = |
| 68 data.mask_resource_id(); | 68 data.mask_resource_id(); |
| 69 quad->resources.count = data.mask_resource_id() ? 1 : 0; | 69 quad->resources.count = data.mask_resource_id() ? 1 : 0; |
| 70 return data.ReadRenderPassId(&quad->render_pass_id) && | 70 return data.ReadRenderPassId(&quad->render_pass_id) && |
| 71 data.ReadMaskUvScale(&quad->mask_uv_scale) && | 71 data.ReadMaskUvScale(&quad->mask_uv_scale) && |
| 72 data.ReadMaskTextureSize(&quad->mask_texture_size) && | 72 data.ReadMaskTextureSize(&quad->mask_texture_size) && |
| 73 data.ReadFilters(&quad->filters) && | |
| 74 data.ReadFiltersScale(&quad->filters_scale) && | 73 data.ReadFiltersScale(&quad->filters_scale) && |
| 75 data.ReadFiltersOrigin(&quad->filters_origin) && | 74 data.ReadFiltersOrigin(&quad->filters_origin); |
| 76 data.ReadBackgroundFilters(&quad->background_filters); | |
| 77 } | 75 } |
| 78 | 76 |
| 79 // static | 77 // static |
| 80 bool StructTraits<cc::mojom::SolidColorQuadStateDataView, cc::DrawQuad>::Read( | 78 bool StructTraits<cc::mojom::SolidColorQuadStateDataView, cc::DrawQuad>::Read( |
| 81 cc::mojom::SolidColorQuadStateDataView data, | 79 cc::mojom::SolidColorQuadStateDataView data, |
| 82 cc::DrawQuad* out) { | 80 cc::DrawQuad* out) { |
| 83 cc::SolidColorDrawQuad* quad = static_cast<cc::SolidColorDrawQuad*>(out); | 81 cc::SolidColorDrawQuad* quad = static_cast<cc::SolidColorDrawQuad*>(out); |
| 84 quad->force_anti_aliasing_off = data.force_anti_aliasing_off(); | 82 quad->force_anti_aliasing_off = data.force_anti_aliasing_off(); |
| 85 quad->color = data.color(); | 83 quad->color = data.color(); |
| 86 return true; | 84 return true; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 cc::DrawQuad* out) { | 222 cc::DrawQuad* out) { |
| 225 if (!data.ReadRect(&out->rect) || !data.ReadOpaqueRect(&out->opaque_rect) || | 223 if (!data.ReadRect(&out->rect) || !data.ReadOpaqueRect(&out->opaque_rect) || |
| 226 !data.ReadVisibleRect(&out->visible_rect)) { | 224 !data.ReadVisibleRect(&out->visible_rect)) { |
| 227 return false; | 225 return false; |
| 228 } | 226 } |
| 229 out->needs_blending = data.needs_blending(); | 227 out->needs_blending = data.needs_blending(); |
| 230 return data.ReadDrawQuadState(out); | 228 return data.ReadDrawQuadState(out); |
| 231 } | 229 } |
| 232 | 230 |
| 233 } // namespace mojo | 231 } // namespace mojo |
| OLD | NEW |