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

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

Issue 331533002: Use a struct for cc::Surface ids for more type safety (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add is_null and explicit ctor Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/common/cc_messages.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 streamvideo_in->SetAll(shared_state3_in, 396 streamvideo_in->SetAll(shared_state3_in,
397 arbitrary_rect2, 397 arbitrary_rect2,
398 arbitrary_rect2_inside_rect2, 398 arbitrary_rect2_inside_rect2,
399 arbitrary_rect1_inside_rect2, 399 arbitrary_rect1_inside_rect2,
400 arbitrary_bool1, 400 arbitrary_bool1,
401 arbitrary_resourceid2, 401 arbitrary_resourceid2,
402 arbitrary_matrix); 402 arbitrary_matrix);
403 scoped_ptr<DrawQuad> streamvideo_cmp = streamvideo_in->Copy( 403 scoped_ptr<DrawQuad> streamvideo_cmp = streamvideo_in->Copy(
404 streamvideo_in->shared_quad_state); 404 streamvideo_in->shared_quad_state);
405 405
406 int arbitrary_surface_id = 3; 406 cc::SurfaceId arbitrary_surface_id(3);
407 scoped_ptr<SurfaceDrawQuad> surface_in = SurfaceDrawQuad::Create(); 407 scoped_ptr<SurfaceDrawQuad> surface_in = SurfaceDrawQuad::Create();
408 surface_in->SetAll(shared_state3_in, 408 surface_in->SetAll(shared_state3_in,
409 arbitrary_rect2, 409 arbitrary_rect2,
410 arbitrary_rect2_inside_rect2, 410 arbitrary_rect2_inside_rect2,
411 arbitrary_rect1_inside_rect2, 411 arbitrary_rect1_inside_rect2,
412 arbitrary_bool1, 412 arbitrary_bool1,
413 arbitrary_surface_id); 413 arbitrary_surface_id);
414 scoped_ptr<DrawQuad> surface_cmp = surface_in->Copy( 414 scoped_ptr<DrawQuad> surface_cmp = surface_in->Copy(
415 surface_in->shared_quad_state); 415 surface_in->shared_quad_state);
416 416
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 SoftwareFrameData frame_out; 808 SoftwareFrameData frame_out;
809 PickleIterator iter(msg); 809 PickleIterator iter(msg);
810 EXPECT_EQ( 810 EXPECT_EQ(
811 expect_read, 811 expect_read,
812 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); 812 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out));
813 } 813 }
814 } 814 }
815 815
816 } // namespace 816 } // namespace
817 } // namespace content 817 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698