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

Side by Side Diff: mojo/converters/surfaces/tests/surface_unittest.cc

Issue 1152473006: cc: Remove DrawQuad::IterateResoruces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/quads/render_pass.h" 5 #include "cc/quads/render_pass.h"
6 #include "cc/quads/solid_color_draw_quad.h" 6 #include "cc/quads/solid_color_draw_quad.h"
7 #include "cc/quads/surface_draw_quad.h" 7 #include "cc/quads/surface_draw_quad.h"
8 #include "cc/quads/texture_draw_quad.h" 8 #include "cc/quads/texture_draw_quad.h"
9 #include "gpu/command_buffer/common/mailbox.h" 9 #include "gpu/command_buffer/common/mailbox.h"
10 #include "gpu/command_buffer/common/mailbox_holder.h" 10 #include "gpu/command_buffer/common/mailbox_holder.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 ASSERT_EQ(cc::DrawQuad::SURFACE_CONTENT, round_trip_quad->material); 346 ASSERT_EQ(cc::DrawQuad::SURFACE_CONTENT, round_trip_quad->material);
347 const cc::SurfaceDrawQuad* round_trip_surface_quad = 347 const cc::SurfaceDrawQuad* round_trip_surface_quad =
348 cc::SurfaceDrawQuad::MaterialCast(round_trip_quad); 348 cc::SurfaceDrawQuad::MaterialCast(round_trip_quad);
349 EXPECT_EQ(arbitrary_id, round_trip_surface_quad->surface_id); 349 EXPECT_EQ(arbitrary_id, round_trip_surface_quad->surface_id);
350 350
351 round_trip_quad = round_trip_pass->quad_list.ElementAt(2); 351 round_trip_quad = round_trip_pass->quad_list.ElementAt(2);
352 // Third is texture quad. 352 // Third is texture quad.
353 ASSERT_EQ(cc::DrawQuad::TEXTURE_CONTENT, round_trip_quad->material); 353 ASSERT_EQ(cc::DrawQuad::TEXTURE_CONTENT, round_trip_quad->material);
354 const cc::TextureDrawQuad* round_trip_texture_quad = 354 const cc::TextureDrawQuad* round_trip_texture_quad =
355 cc::TextureDrawQuad::MaterialCast(round_trip_quad); 355 cc::TextureDrawQuad::MaterialCast(round_trip_quad);
356 EXPECT_EQ(resource_id, round_trip_texture_quad->resource_id); 356 EXPECT_EQ(resource_id, round_trip_texture_quad->resource_id());
357 EXPECT_EQ(premultiplied_alpha, round_trip_texture_quad->premultiplied_alpha); 357 EXPECT_EQ(premultiplied_alpha, round_trip_texture_quad->premultiplied_alpha);
358 EXPECT_EQ(uv_top_left, round_trip_texture_quad->uv_top_left); 358 EXPECT_EQ(uv_top_left, round_trip_texture_quad->uv_top_left);
359 EXPECT_EQ(uv_bottom_right, round_trip_texture_quad->uv_bottom_right); 359 EXPECT_EQ(uv_bottom_right, round_trip_texture_quad->uv_bottom_right);
360 EXPECT_EQ(background_color, round_trip_texture_quad->background_color); 360 EXPECT_EQ(background_color, round_trip_texture_quad->background_color);
361 for (size_t i = 0; i < 4; ++i) { 361 for (size_t i = 0; i < 4; ++i) {
362 EXPECT_EQ(vertex_opacity[i], round_trip_texture_quad->vertex_opacity[i]) 362 EXPECT_EQ(vertex_opacity[i], round_trip_texture_quad->vertex_opacity[i])
363 << i; 363 << i;
364 } 364 }
365 EXPECT_EQ(y_flipped, round_trip_texture_quad->y_flipped); 365 EXPECT_EQ(y_flipped, round_trip_texture_quad->y_flipped);
366 } 366 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 cc::ReturnedResource round_trip_resource = 462 cc::ReturnedResource round_trip_resource =
463 mojo_resource.To<cc::ReturnedResource>(); 463 mojo_resource.To<cc::ReturnedResource>();
464 EXPECT_EQ(id, round_trip_resource.id); 464 EXPECT_EQ(id, round_trip_resource.id);
465 EXPECT_EQ(sync_point, round_trip_resource.sync_point); 465 EXPECT_EQ(sync_point, round_trip_resource.sync_point);
466 EXPECT_EQ(count, round_trip_resource.count); 466 EXPECT_EQ(count, round_trip_resource.count);
467 EXPECT_EQ(lost, round_trip_resource.lost); 467 EXPECT_EQ(lost, round_trip_resource.lost);
468 } 468 }
469 469
470 } // namespace 470 } // namespace
471 } // namespace mojo 471 } // namespace mojo
OLDNEW
« content/common/cc_messages.cc ('K') | « mojo/converters/surfaces/surfaces_type_converters.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698