| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) && | 73 data.ReadFilters(&quad->filters) && |
| 74 data.ReadFiltersScale(&quad->filters_scale) && | 74 data.ReadFiltersScale(&quad->filters_scale) && |
| 75 data.ReadFiltersOrigin(&quad->filters_origin) && |
| 75 data.ReadBackgroundFilters(&quad->background_filters); | 76 data.ReadBackgroundFilters(&quad->background_filters); |
| 76 } | 77 } |
| 77 | 78 |
| 78 // static | 79 // static |
| 79 bool StructTraits<cc::mojom::SolidColorQuadStateDataView, cc::DrawQuad>::Read( | 80 bool StructTraits<cc::mojom::SolidColorQuadStateDataView, cc::DrawQuad>::Read( |
| 80 cc::mojom::SolidColorQuadStateDataView data, | 81 cc::mojom::SolidColorQuadStateDataView data, |
| 81 cc::DrawQuad* out) { | 82 cc::DrawQuad* out) { |
| 82 cc::SolidColorDrawQuad* quad = static_cast<cc::SolidColorDrawQuad*>(out); | 83 cc::SolidColorDrawQuad* quad = static_cast<cc::SolidColorDrawQuad*>(out); |
| 83 quad->force_anti_aliasing_off = data.force_anti_aliasing_off(); | 84 quad->force_anti_aliasing_off = data.force_anti_aliasing_off(); |
| 84 quad->color = data.color(); | 85 quad->color = data.color(); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 cc::DrawQuad* out) { | 224 cc::DrawQuad* out) { |
| 224 if (!data.ReadRect(&out->rect) || !data.ReadOpaqueRect(&out->opaque_rect) || | 225 if (!data.ReadRect(&out->rect) || !data.ReadOpaqueRect(&out->opaque_rect) || |
| 225 !data.ReadVisibleRect(&out->visible_rect)) { | 226 !data.ReadVisibleRect(&out->visible_rect)) { |
| 226 return false; | 227 return false; |
| 227 } | 228 } |
| 228 out->needs_blending = data.needs_blending(); | 229 out->needs_blending = data.needs_blending(); |
| 229 return data.ReadDrawQuadState(out); | 230 return data.ReadDrawQuadState(out); |
| 230 } | 231 } |
| 231 | 232 |
| 232 } // namespace mojo | 233 } // namespace mojo |
| OLD | NEW |