| 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 "cc/output/compositor_frame.h" | 5 #include "cc/output/compositor_frame.h" |
| 6 #include "cc/output/delegated_frame_data.h" | 6 #include "cc/output/delegated_frame_data.h" |
| 7 #include "cc/quads/render_pass.h" | 7 #include "cc/quads/render_pass.h" |
| 8 #include "cc/quads/render_pass_draw_quad.h" | 8 #include "cc/quads/render_pass_draw_quad.h" |
| 9 #include "cc/quads/solid_color_draw_quad.h" | 9 #include "cc/quads/solid_color_draw_quad.h" |
| 10 #include "cc/quads/surface_draw_quad.h" | 10 #include "cc/quads/surface_draw_quad.h" |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 const gfx::Rect rect; | 1186 const gfx::Rect rect; |
| 1187 const gfx::Rect opaque_rect; | 1187 const gfx::Rect opaque_rect; |
| 1188 const gfx::Rect visible_rect; | 1188 const gfx::Rect visible_rect; |
| 1189 bool needs_blending = false; | 1189 bool needs_blending = false; |
| 1190 bool premultiplied_alpha = false; | 1190 bool premultiplied_alpha = false; |
| 1191 const gfx::PointF uv_top_left; | 1191 const gfx::PointF uv_top_left; |
| 1192 const gfx::PointF uv_bottom_right; | 1192 const gfx::PointF uv_bottom_right; |
| 1193 SkColor background_color = SK_ColorGREEN; | 1193 SkColor background_color = SK_ColorGREEN; |
| 1194 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; | 1194 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; |
| 1195 bool flipped = false; | 1195 bool flipped = false; |
| 1196 bool nearest_neighbor = false; |
| 1196 quad->SetAll(sqs, | 1197 quad->SetAll(sqs, |
| 1197 rect, | 1198 rect, |
| 1198 opaque_rect, | 1199 opaque_rect, |
| 1199 visible_rect, | 1200 visible_rect, |
| 1200 needs_blending, | 1201 needs_blending, |
| 1201 resource_ids[i], | 1202 resource_ids[i], |
| 1202 premultiplied_alpha, | 1203 premultiplied_alpha, |
| 1203 uv_top_left, | 1204 uv_top_left, |
| 1204 uv_bottom_right, | 1205 uv_bottom_right, |
| 1205 background_color, | 1206 background_color, |
| 1206 vertex_opacity, | 1207 vertex_opacity, |
| 1207 flipped); | 1208 flipped, |
| 1209 nearest_neighbor); |
| 1208 | 1210 |
| 1209 quad->shared_quad_state = sqs; | 1211 quad->shared_quad_state = sqs; |
| 1210 } | 1212 } |
| 1211 frame_data->render_pass_list.push_back(pass.Pass()); | 1213 frame_data->render_pass_list.push_back(pass.Pass()); |
| 1212 scoped_ptr<CompositorFrame> frame(new CompositorFrame); | 1214 scoped_ptr<CompositorFrame> frame(new CompositorFrame); |
| 1213 frame->delegated_frame_data = frame_data.Pass(); | 1215 frame->delegated_frame_data = frame_data.Pass(); |
| 1214 factory->SubmitFrame(surface_id, frame.Pass(), base::Closure()); | 1216 factory->SubmitFrame(surface_id, frame.Pass(), base::Closure()); |
| 1215 } | 1217 } |
| 1216 | 1218 |
| 1217 TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) { | 1219 TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1238 returned_ids[i] = client.returned_resources()[i].id; | 1240 returned_ids[i] = client.returned_resources()[i].id; |
| 1239 } | 1241 } |
| 1240 EXPECT_THAT(returned_ids, | 1242 EXPECT_THAT(returned_ids, |
| 1241 testing::WhenSorted(testing::ElementsAreArray(ids))); | 1243 testing::WhenSorted(testing::ElementsAreArray(ids))); |
| 1242 factory.Destroy(surface_id); | 1244 factory.Destroy(surface_id); |
| 1243 } | 1245 } |
| 1244 | 1246 |
| 1245 } // namespace | 1247 } // namespace |
| 1246 } // namespace cc | 1248 } // namespace cc |
| 1247 | 1249 |
| OLD | NEW |