| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 EXPECT_EQ(a->premultiplied_alpha, b->premultiplied_alpha); | 173 EXPECT_EQ(a->premultiplied_alpha, b->premultiplied_alpha); |
| 174 EXPECT_EQ(a->uv_top_left, b->uv_top_left); | 174 EXPECT_EQ(a->uv_top_left, b->uv_top_left); |
| 175 EXPECT_EQ(a->uv_bottom_right, b->uv_bottom_right); | 175 EXPECT_EQ(a->uv_bottom_right, b->uv_bottom_right); |
| 176 EXPECT_EQ(a->background_color, b->background_color); | 176 EXPECT_EQ(a->background_color, b->background_color); |
| 177 EXPECT_EQ(a->vertex_opacity[0], b->vertex_opacity[0]); | 177 EXPECT_EQ(a->vertex_opacity[0], b->vertex_opacity[0]); |
| 178 EXPECT_EQ(a->vertex_opacity[1], b->vertex_opacity[1]); | 178 EXPECT_EQ(a->vertex_opacity[1], b->vertex_opacity[1]); |
| 179 EXPECT_EQ(a->vertex_opacity[2], b->vertex_opacity[2]); | 179 EXPECT_EQ(a->vertex_opacity[2], b->vertex_opacity[2]); |
| 180 EXPECT_EQ(a->vertex_opacity[3], b->vertex_opacity[3]); | 180 EXPECT_EQ(a->vertex_opacity[3], b->vertex_opacity[3]); |
| 181 EXPECT_EQ(a->y_flipped, b->y_flipped); | 181 EXPECT_EQ(a->y_flipped, b->y_flipped); |
| 182 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); | 182 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); |
| 183 EXPECT_EQ(a->secure_output_only, b->secure_output_only); |
| 183 } | 184 } |
| 184 | 185 |
| 185 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { | 186 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { |
| 186 EXPECT_EQ(a->resource_id(), b->resource_id()); | 187 EXPECT_EQ(a->resource_id(), b->resource_id()); |
| 187 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); | 188 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); |
| 188 EXPECT_EQ(a->texture_size, b->texture_size); | 189 EXPECT_EQ(a->texture_size, b->texture_size); |
| 189 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); | 190 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); |
| 190 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); | 191 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); |
| 191 } | 192 } |
| 192 | 193 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 gfx::Vector2dF arbitrary_vector2df2(-8.3f, 0.47f); | 250 gfx::Vector2dF arbitrary_vector2df2(-8.3f, 0.47f); |
| 250 float arbitrary_float1 = 0.7f; | 251 float arbitrary_float1 = 0.7f; |
| 251 float arbitrary_float2 = 0.3f; | 252 float arbitrary_float2 = 0.3f; |
| 252 float arbitrary_float3 = 0.9f; | 253 float arbitrary_float3 = 0.9f; |
| 253 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f}; | 254 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f}; |
| 254 bool arbitrary_bool1 = true; | 255 bool arbitrary_bool1 = true; |
| 255 bool arbitrary_bool2 = false; | 256 bool arbitrary_bool2 = false; |
| 256 bool arbitrary_bool3 = true; | 257 bool arbitrary_bool3 = true; |
| 257 bool arbitrary_bool4 = true; | 258 bool arbitrary_bool4 = true; |
| 258 bool arbitrary_bool5 = false; | 259 bool arbitrary_bool5 = false; |
| 260 bool arbitrary_bool6 = true; |
| 259 int arbitrary_context_id1 = 12; | 261 int arbitrary_context_id1 = 12; |
| 260 int arbitrary_context_id2 = 57; | 262 int arbitrary_context_id2 = 57; |
| 261 int arbitrary_context_id3 = -503; | 263 int arbitrary_context_id3 = -503; |
| 262 int arbitrary_int = 5; | 264 int arbitrary_int = 5; |
| 263 SkColor arbitrary_color = SkColorSetARGB(25, 36, 47, 58); | 265 SkColor arbitrary_color = SkColorSetARGB(25, 36, 47, 58); |
| 264 SkXfermode::Mode arbitrary_blend_mode1 = SkXfermode::kScreen_Mode; | 266 SkXfermode::Mode arbitrary_blend_mode1 = SkXfermode::kScreen_Mode; |
| 265 SkXfermode::Mode arbitrary_blend_mode2 = SkXfermode::kLighten_Mode; | 267 SkXfermode::Mode arbitrary_blend_mode2 = SkXfermode::kLighten_Mode; |
| 266 SkXfermode::Mode arbitrary_blend_mode3 = SkXfermode::kOverlay_Mode; | 268 SkXfermode::Mode arbitrary_blend_mode3 = SkXfermode::kOverlay_Mode; |
| 267 IOSurfaceDrawQuad::Orientation arbitrary_orientation = | 269 IOSurfaceDrawQuad::Orientation arbitrary_orientation = |
| 268 IOSurfaceDrawQuad::UNFLIPPED; | 270 IOSurfaceDrawQuad::UNFLIPPED; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 SurfaceDrawQuad* surface_in = | 381 SurfaceDrawQuad* surface_in = |
| 380 pass_in->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); | 382 pass_in->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); |
| 381 surface_in->SetAll(shared_state3_in, arbitrary_rect2, | 383 surface_in->SetAll(shared_state3_in, arbitrary_rect2, |
| 382 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2, | 384 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2, |
| 383 arbitrary_bool1, arbitrary_surface_id); | 385 arbitrary_bool1, arbitrary_surface_id); |
| 384 pass_cmp->CopyFromAndAppendDrawQuad(surface_in, | 386 pass_cmp->CopyFromAndAppendDrawQuad(surface_in, |
| 385 surface_in->shared_quad_state); | 387 surface_in->shared_quad_state); |
| 386 | 388 |
| 387 TextureDrawQuad* texture_in = | 389 TextureDrawQuad* texture_in = |
| 388 pass_in->CreateAndAppendDrawQuad<TextureDrawQuad>(); | 390 pass_in->CreateAndAppendDrawQuad<TextureDrawQuad>(); |
| 389 texture_in->SetAll( | 391 texture_in->SetAll(shared_state3_in, arbitrary_rect2, |
| 390 shared_state3_in, arbitrary_rect2, arbitrary_rect2_inside_rect2, | 392 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2, |
| 391 arbitrary_rect1_inside_rect2, arbitrary_bool1, arbitrary_resourceid1, | 393 arbitrary_bool1, arbitrary_resourceid1, arbitrary_size1, |
| 392 arbitrary_size1, arbitrary_bool2, arbitrary_pointf1, arbitrary_pointf2, | 394 arbitrary_bool2, arbitrary_pointf1, arbitrary_pointf2, |
| 393 arbitrary_color, arbitrary_float_array, arbitrary_bool4, arbitrary_bool5); | 395 arbitrary_color, arbitrary_float_array, arbitrary_bool4, |
| 396 arbitrary_bool5, arbitrary_bool6); |
| 394 pass_cmp->CopyFromAndAppendDrawQuad(texture_in, | 397 pass_cmp->CopyFromAndAppendDrawQuad(texture_in, |
| 395 texture_in->shared_quad_state); | 398 texture_in->shared_quad_state); |
| 396 | 399 |
| 397 TileDrawQuad* tile_in = pass_in->CreateAndAppendDrawQuad<TileDrawQuad>(); | 400 TileDrawQuad* tile_in = pass_in->CreateAndAppendDrawQuad<TileDrawQuad>(); |
| 398 tile_in->SetAll(shared_state3_in, arbitrary_rect2, | 401 tile_in->SetAll(shared_state3_in, arbitrary_rect2, |
| 399 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2, | 402 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2, |
| 400 arbitrary_bool1, arbitrary_resourceid3, arbitrary_rectf1, | 403 arbitrary_bool1, arbitrary_resourceid3, arbitrary_rectf1, |
| 401 arbitrary_size1, arbitrary_bool2, arbitrary_bool3); | 404 arbitrary_size1, arbitrary_bool2, arbitrary_bool3); |
| 402 pass_cmp->CopyFromAndAppendDrawQuad(tile_in, tile_in->shared_quad_state); | 405 pass_cmp->CopyFromAndAppendDrawQuad(tile_in, tile_in->shared_quad_state); |
| 403 | 406 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 EXPECT_TRUE( | 622 EXPECT_TRUE( |
| 620 IPC::ParamTraits<DelegatedFrameData>::Read(&msg, &iter, &frame_out)); | 623 IPC::ParamTraits<DelegatedFrameData>::Read(&msg, &iter, &frame_out)); |
| 621 | 624 |
| 622 ASSERT_EQ(2u, frame_out.resource_list.size()); | 625 ASSERT_EQ(2u, frame_out.resource_list.size()); |
| 623 Compare(arbitrary_resource1, frame_out.resource_list[0]); | 626 Compare(arbitrary_resource1, frame_out.resource_list[0]); |
| 624 Compare(arbitrary_resource2, frame_out.resource_list[1]); | 627 Compare(arbitrary_resource2, frame_out.resource_list[1]); |
| 625 } | 628 } |
| 626 | 629 |
| 627 } // namespace | 630 } // namespace |
| 628 } // namespace content | 631 } // namespace content |
| OLD | NEW |