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

Side by Side Diff: content/common/cc_messages_unittest.cc

Issue 1968363002: SurfaceAggregator should check whether output is secure when drawin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 (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 "content/common/cc_messages.h" 5 #include "content/common/cc_messages.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 gfx::Vector2dF arbitrary_vector2df2(-8.3f, 0.47f); 251 gfx::Vector2dF arbitrary_vector2df2(-8.3f, 0.47f);
252 float arbitrary_float1 = 0.7f; 252 float arbitrary_float1 = 0.7f;
253 float arbitrary_float2 = 0.3f; 253 float arbitrary_float2 = 0.3f;
254 float arbitrary_float3 = 0.9f; 254 float arbitrary_float3 = 0.9f;
255 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f}; 255 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f};
256 bool arbitrary_bool1 = true; 256 bool arbitrary_bool1 = true;
257 bool arbitrary_bool2 = false; 257 bool arbitrary_bool2 = false;
258 bool arbitrary_bool3 = true; 258 bool arbitrary_bool3 = true;
259 bool arbitrary_bool4 = true; 259 bool arbitrary_bool4 = true;
260 bool arbitrary_bool5 = false; 260 bool arbitrary_bool5 = false;
261 bool arbitrary_bool6 = true;
261 int arbitrary_context_id1 = 12; 262 int arbitrary_context_id1 = 12;
262 int arbitrary_context_id2 = 57; 263 int arbitrary_context_id2 = 57;
263 int arbitrary_context_id3 = -503; 264 int arbitrary_context_id3 = -503;
264 int arbitrary_int = 5; 265 int arbitrary_int = 5;
265 SkColor arbitrary_color = SkColorSetARGB(25, 36, 47, 58); 266 SkColor arbitrary_color = SkColorSetARGB(25, 36, 47, 58);
266 SkXfermode::Mode arbitrary_blend_mode1 = SkXfermode::kScreen_Mode; 267 SkXfermode::Mode arbitrary_blend_mode1 = SkXfermode::kScreen_Mode;
267 SkXfermode::Mode arbitrary_blend_mode2 = SkXfermode::kLighten_Mode; 268 SkXfermode::Mode arbitrary_blend_mode2 = SkXfermode::kLighten_Mode;
268 SkXfermode::Mode arbitrary_blend_mode3 = SkXfermode::kOverlay_Mode; 269 SkXfermode::Mode arbitrary_blend_mode3 = SkXfermode::kOverlay_Mode;
269 IOSurfaceDrawQuad::Orientation arbitrary_orientation = 270 IOSurfaceDrawQuad::Orientation arbitrary_orientation =
270 IOSurfaceDrawQuad::UNFLIPPED; 271 IOSurfaceDrawQuad::UNFLIPPED;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 arbitrary_bool1, 400 arbitrary_bool1,
400 arbitrary_surface_id); 401 arbitrary_surface_id);
401 pass_cmp->CopyFromAndAppendDrawQuad(surface_in, 402 pass_cmp->CopyFromAndAppendDrawQuad(surface_in,
402 surface_in->shared_quad_state); 403 surface_in->shared_quad_state);
403 404
404 TextureDrawQuad* texture_in = 405 TextureDrawQuad* texture_in =
405 pass_in->CreateAndAppendDrawQuad<TextureDrawQuad>(); 406 pass_in->CreateAndAppendDrawQuad<TextureDrawQuad>();
406 texture_in->SetAll(shared_state3_in, arbitrary_rect2, 407 texture_in->SetAll(shared_state3_in, arbitrary_rect2,
407 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2, 408 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2,
408 arbitrary_bool1, arbitrary_resourceid1, arbitrary_size1, 409 arbitrary_bool1, arbitrary_resourceid1, arbitrary_size1,
409 arbitrary_bool2, arbitrary_pointf1, 410 arbitrary_bool2, arbitrary_pointf1, arbitrary_pointf2,
410 arbitrary_pointf2, arbitrary_color, arbitrary_float_array, 411 arbitrary_color, arbitrary_float_array, arbitrary_bool4,
411 arbitrary_bool4, arbitrary_bool5); 412 arbitrary_bool5, arbitrary_bool6);
412 pass_cmp->CopyFromAndAppendDrawQuad(texture_in, 413 pass_cmp->CopyFromAndAppendDrawQuad(texture_in,
413 texture_in->shared_quad_state); 414 texture_in->shared_quad_state);
414 415
415 TileDrawQuad* tile_in = pass_in->CreateAndAppendDrawQuad<TileDrawQuad>(); 416 TileDrawQuad* tile_in = pass_in->CreateAndAppendDrawQuad<TileDrawQuad>();
416 tile_in->SetAll(shared_state3_in, 417 tile_in->SetAll(shared_state3_in,
417 arbitrary_rect2, 418 arbitrary_rect2,
418 arbitrary_rect2_inside_rect2, 419 arbitrary_rect2_inside_rect2,
419 arbitrary_rect1_inside_rect2, 420 arbitrary_rect1_inside_rect2,
420 arbitrary_bool1, 421 arbitrary_bool1,
421 arbitrary_resourceid3, 422 arbitrary_resourceid3,
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, 674 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
674 &iter, &frame_out)); 675 &iter, &frame_out));
675 676
676 ASSERT_EQ(2u, frame_out.resource_list.size()); 677 ASSERT_EQ(2u, frame_out.resource_list.size());
677 Compare(arbitrary_resource1, frame_out.resource_list[0]); 678 Compare(arbitrary_resource1, frame_out.resource_list[0]);
678 Compare(arbitrary_resource2, frame_out.resource_list[1]); 679 Compare(arbitrary_resource2, frame_out.resource_list[1]);
679 } 680 }
680 681
681 } // namespace 682 } // namespace
682 } // namespace content 683 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698