Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Side by Side Diff: cc/surfaces/surface_aggregator_unittest.cc

Issue 1142343008: cc: Rework overlays to not use the ResourceProvider and pass texture size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 const gfx::Rect opaque_rect; 1345 const gfx::Rect opaque_rect;
1346 const gfx::Rect visible_rect; 1346 const gfx::Rect visible_rect;
1347 bool needs_blending = false; 1347 bool needs_blending = false;
1348 bool premultiplied_alpha = false; 1348 bool premultiplied_alpha = false;
1349 const gfx::PointF uv_top_left; 1349 const gfx::PointF uv_top_left;
1350 const gfx::PointF uv_bottom_right; 1350 const gfx::PointF uv_bottom_right;
1351 SkColor background_color = SK_ColorGREEN; 1351 SkColor background_color = SK_ColorGREEN;
1352 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; 1352 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f};
1353 bool flipped = false; 1353 bool flipped = false;
1354 bool nearest_neighbor = false; 1354 bool nearest_neighbor = false;
1355 quad->SetAll(sqs, 1355 quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending,
1356 rect, 1356 resource_ids[i], gfx::Size(), false, premultiplied_alpha,
1357 opaque_rect, 1357 uv_top_left, uv_bottom_right, background_color, vertex_opacity,
1358 visible_rect, 1358 flipped, nearest_neighbor);
1359 needs_blending,
1360 resource_ids[i],
1361 premultiplied_alpha,
1362 uv_top_left,
1363 uv_bottom_right,
1364 background_color,
1365 vertex_opacity,
1366 flipped,
1367 nearest_neighbor);
1368 } 1359 }
1369 frame_data->render_pass_list.push_back(pass.Pass()); 1360 frame_data->render_pass_list.push_back(pass.Pass());
1370 scoped_ptr<CompositorFrame> frame(new CompositorFrame); 1361 scoped_ptr<CompositorFrame> frame(new CompositorFrame);
1371 frame->delegated_frame_data = frame_data.Pass(); 1362 frame->delegated_frame_data = frame_data.Pass();
1372 factory->SubmitFrame(surface_id, frame.Pass(), 1363 factory->SubmitFrame(surface_id, frame.Pass(),
1373 SurfaceFactory::DrawCallback()); 1364 SurfaceFactory::DrawCallback());
1374 } 1365 }
1375 1366
1376 TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) { 1367 TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) {
1377 ResourceTrackingSurfaceFactoryClient client; 1368 ResourceTrackingSurfaceFactoryClient client;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 EXPECT_EQ(9u, pass_list->back()->quad_list.size()); 1506 EXPECT_EQ(9u, pass_list->back()->quad_list.size());
1516 1507
1517 factory.Destroy(root_surface_id); 1508 factory.Destroy(root_surface_id);
1518 factory.Destroy(child_surface_id); 1509 factory.Destroy(child_surface_id);
1519 factory.Destroy(middle_surface_id); 1510 factory.Destroy(middle_surface_id);
1520 } 1511 }
1521 1512
1522 } // namespace 1513 } // namespace
1523 } // namespace cc 1514 } // namespace cc
1524 1515
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698