OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/converters/surfaces/surfaces_type_converters.h" | 5 #include "mojo/converters/surfaces/surfaces_type_converters.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
9 #include "cc/output/delegated_frame_data.h" | 9 #include "cc/output/delegated_frame_data.h" |
10 #include "cc/quads/draw_quad.h" | 10 #include "cc/quads/draw_quad.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 input->rect.To<gfx::Rect>(), | 133 input->rect.To<gfx::Rect>(), |
134 input->opaque_rect.To<gfx::Rect>(), | 134 input->opaque_rect.To<gfx::Rect>(), |
135 input->visible_rect.To<gfx::Rect>(), | 135 input->visible_rect.To<gfx::Rect>(), |
136 input->needs_blending, | 136 input->needs_blending, |
137 texture_quad_state->resource_id, | 137 texture_quad_state->resource_id, |
138 texture_quad_state->premultiplied_alpha, | 138 texture_quad_state->premultiplied_alpha, |
139 texture_quad_state->uv_top_left.To<gfx::PointF>(), | 139 texture_quad_state->uv_top_left.To<gfx::PointF>(), |
140 texture_quad_state->uv_bottom_right.To<gfx::PointF>(), | 140 texture_quad_state->uv_bottom_right.To<gfx::PointF>(), |
141 texture_quad_state->background_color.To<SkColor>(), | 141 texture_quad_state->background_color.To<SkColor>(), |
142 &texture_quad_state->vertex_opacity.storage()[0], | 142 &texture_quad_state->vertex_opacity.storage()[0], |
143 texture_quad_state->flipped); | 143 texture_quad_state->flipped, |
| 144 texture_quad_state->nearest_neighbor); |
144 break; | 145 break; |
145 } | 146 } |
146 case MATERIAL_TILED_CONTENT: { | 147 case MATERIAL_TILED_CONTENT: { |
147 TileQuadStatePtr& tile_state = input->tile_quad_state; | 148 TileQuadStatePtr& tile_state = input->tile_quad_state; |
148 if (tile_state.is_null()) | 149 if (tile_state.is_null()) |
149 return false; | 150 return false; |
150 cc::TileDrawQuad* tile_quad = | 151 cc::TileDrawQuad* tile_quad = |
151 render_pass->CreateAndAppendDrawQuad<cc::TileDrawQuad>(); | 152 render_pass->CreateAndAppendDrawQuad<cc::TileDrawQuad>(); |
152 tile_quad->SetAll(sqs, | 153 tile_quad->SetAll(sqs, |
153 input->rect.To<gfx::Rect>(), | 154 input->rect.To<gfx::Rect>(), |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 if (!pass) | 575 if (!pass) |
575 return scoped_ptr<cc::CompositorFrame>(); | 576 return scoped_ptr<cc::CompositorFrame>(); |
576 frame_data->render_pass_list.push_back(pass.Pass()); | 577 frame_data->render_pass_list.push_back(pass.Pass()); |
577 } | 578 } |
578 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 579 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); |
579 frame->delegated_frame_data = frame_data.Pass(); | 580 frame->delegated_frame_data = frame_data.Pass(); |
580 return frame.Pass(); | 581 return frame.Pass(); |
581 } | 582 } |
582 | 583 |
583 } // namespace mojo | 584 } // namespace mojo |
OLD | NEW |