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 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 const gfx::Rect opaque_rect; | 1349 const gfx::Rect opaque_rect; |
1350 const gfx::Rect visible_rect; | 1350 const gfx::Rect visible_rect; |
1351 bool needs_blending = false; | 1351 bool needs_blending = false; |
1352 bool premultiplied_alpha = false; | 1352 bool premultiplied_alpha = false; |
1353 const gfx::PointF uv_top_left; | 1353 const gfx::PointF uv_top_left; |
1354 const gfx::PointF uv_bottom_right; | 1354 const gfx::PointF uv_bottom_right; |
1355 SkColor background_color = SK_ColorGREEN; | 1355 SkColor background_color = SK_ColorGREEN; |
1356 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; | 1356 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; |
1357 bool flipped = false; | 1357 bool flipped = false; |
1358 bool nearest_neighbor = false; | 1358 bool nearest_neighbor = false; |
1359 quad->SetAll(sqs, | 1359 quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending, |
1360 rect, | 1360 resource_ids[i], gfx::Size(), false, premultiplied_alpha, |
1361 opaque_rect, | 1361 uv_top_left, uv_bottom_right, background_color, vertex_opacity, |
1362 visible_rect, | 1362 flipped, nearest_neighbor); |
1363 needs_blending, | |
1364 resource_ids[i], | |
1365 premultiplied_alpha, | |
1366 uv_top_left, | |
1367 uv_bottom_right, | |
1368 background_color, | |
1369 vertex_opacity, | |
1370 flipped, | |
1371 nearest_neighbor); | |
1372 } | 1363 } |
1373 frame_data->render_pass_list.push_back(pass.Pass()); | 1364 frame_data->render_pass_list.push_back(pass.Pass()); |
1374 scoped_ptr<CompositorFrame> frame(new CompositorFrame); | 1365 scoped_ptr<CompositorFrame> frame(new CompositorFrame); |
1375 frame->delegated_frame_data = frame_data.Pass(); | 1366 frame->delegated_frame_data = frame_data.Pass(); |
1376 factory->SubmitFrame(surface_id, frame.Pass(), | 1367 factory->SubmitFrame(surface_id, frame.Pass(), |
1377 SurfaceFactory::DrawCallback()); | 1368 SurfaceFactory::DrawCallback()); |
1378 } | 1369 } |
1379 | 1370 |
1380 TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) { | 1371 TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) { |
1381 ResourceTrackingSurfaceFactoryClient client; | 1372 ResourceTrackingSurfaceFactoryClient client; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1519 EXPECT_EQ(9u, pass_list->back()->quad_list.size()); | 1510 EXPECT_EQ(9u, pass_list->back()->quad_list.size()); |
1520 | 1511 |
1521 factory.Destroy(root_surface_id); | 1512 factory.Destroy(root_surface_id); |
1522 factory.Destroy(child_surface_id); | 1513 factory.Destroy(child_surface_id); |
1523 factory.Destroy(middle_surface_id); | 1514 factory.Destroy(middle_surface_id); |
1524 } | 1515 } |
1525 | 1516 |
1526 } // namespace | 1517 } // namespace |
1527 } // namespace cc | 1518 } // namespace cc |
1528 | 1519 |
OLD | NEW |