| 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 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 const gfx::Rect visible_rect; | 1575 const gfx::Rect visible_rect; |
| 1576 bool needs_blending = false; | 1576 bool needs_blending = false; |
| 1577 bool premultiplied_alpha = false; | 1577 bool premultiplied_alpha = false; |
| 1578 const gfx::PointF uv_top_left; | 1578 const gfx::PointF uv_top_left; |
| 1579 const gfx::PointF uv_bottom_right; | 1579 const gfx::PointF uv_bottom_right; |
| 1580 SkColor background_color = SK_ColorGREEN; | 1580 SkColor background_color = SK_ColorGREEN; |
| 1581 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; | 1581 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; |
| 1582 bool flipped = false; | 1582 bool flipped = false; |
| 1583 bool nearest_neighbor = false; | 1583 bool nearest_neighbor = false; |
| 1584 quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending, | 1584 quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending, |
| 1585 resource_ids[i], gfx::Size(), false, premultiplied_alpha, | 1585 resource_ids[i], gfx::Size(), premultiplied_alpha, uv_top_left, |
| 1586 uv_top_left, uv_bottom_right, background_color, vertex_opacity, | 1586 uv_bottom_right, background_color, vertex_opacity, flipped, |
| 1587 flipped, nearest_neighbor); | 1587 nearest_neighbor); |
| 1588 } | 1588 } |
| 1589 frame_data->render_pass_list.push_back(pass.Pass()); | 1589 frame_data->render_pass_list.push_back(pass.Pass()); |
| 1590 scoped_ptr<CompositorFrame> frame(new CompositorFrame); | 1590 scoped_ptr<CompositorFrame> frame(new CompositorFrame); |
| 1591 frame->delegated_frame_data = frame_data.Pass(); | 1591 frame->delegated_frame_data = frame_data.Pass(); |
| 1592 factory->SubmitCompositorFrame(surface_id, frame.Pass(), | 1592 factory->SubmitCompositorFrame(surface_id, frame.Pass(), |
| 1593 SurfaceFactory::DrawCallback()); | 1593 SurfaceFactory::DrawCallback()); |
| 1594 } | 1594 } |
| 1595 | 1595 |
| 1596 TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) { | 1596 TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) { |
| 1597 ResourceTrackingSurfaceFactoryClient client; | 1597 ResourceTrackingSurfaceFactoryClient client; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1742 EXPECT_EQ(9u, pass_list->back()->quad_list.size()); | 1742 EXPECT_EQ(9u, pass_list->back()->quad_list.size()); |
| 1743 | 1743 |
| 1744 factory.Destroy(root_surface_id); | 1744 factory.Destroy(root_surface_id); |
| 1745 factory.Destroy(child_surface_id); | 1745 factory.Destroy(child_surface_id); |
| 1746 factory.Destroy(middle_surface_id); | 1746 factory.Destroy(middle_surface_id); |
| 1747 } | 1747 } |
| 1748 | 1748 |
| 1749 } // namespace | 1749 } // namespace |
| 1750 } // namespace cc | 1750 } // namespace cc |
| 1751 | 1751 |
| OLD | NEW |