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

Side by Side Diff: cc/ipc/cc_param_traits_unittest.cc

Issue 2461003003: Reduce GPU mailbox size to 16 bytes (Closed)
Patch Set: fix tests Created 4 years, 1 month 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
« no previous file with comments | « no previous file | cc/ipc/struct_traits_unittest.cc » ('j') | 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 <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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 gpu::SyncToken arbitrary_token1(gpu::CommandBufferNamespace::GPU_IO, 0, 556 gpu::SyncToken arbitrary_token1(gpu::CommandBufferNamespace::GPU_IO, 0,
557 gpu::CommandBufferId::FromUnsafeValue(0x123), 557 gpu::CommandBufferId::FromUnsafeValue(0x123),
558 71234838); 558 71234838);
559 arbitrary_token1.SetVerifyFlush(); 559 arbitrary_token1.SetVerifyFlush();
560 gpu::SyncToken arbitrary_token2(gpu::CommandBufferNamespace::GPU_IO, 0, 560 gpu::SyncToken arbitrary_token2(gpu::CommandBufferNamespace::GPU_IO, 0,
561 gpu::CommandBufferId::FromUnsafeValue(0x123), 561 gpu::CommandBufferId::FromUnsafeValue(0x123),
562 53589793); 562 53589793);
563 arbitrary_token2.SetVerifyFlush(); 563 arbitrary_token2.SetVerifyFlush();
564 564
565 GLbyte arbitrary_mailbox1[GL_MAILBOX_SIZE_CHROMIUM] = { 565 GLbyte arbitrary_mailbox1[GL_MAILBOX_SIZE_CHROMIUM] = {
566 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 566 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6};
567 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4,
568 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4};
569 567
570 GLbyte arbitrary_mailbox2[GL_MAILBOX_SIZE_CHROMIUM] = { 568 GLbyte arbitrary_mailbox2[GL_MAILBOX_SIZE_CHROMIUM] = {
571 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 569 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2};
572 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7,
573 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7};
574 570
575 TransferableResource arbitrary_resource1; 571 TransferableResource arbitrary_resource1;
576 arbitrary_resource1.id = 2178312; 572 arbitrary_resource1.id = 2178312;
577 arbitrary_resource1.format = cc::RGBA_8888; 573 arbitrary_resource1.format = cc::RGBA_8888;
578 arbitrary_resource1.filter = 53; 574 arbitrary_resource1.filter = 53;
579 arbitrary_resource1.size = gfx::Size(37189, 123123); 575 arbitrary_resource1.size = gfx::Size(37189, 123123);
580 arbitrary_resource1.mailbox_holder.mailbox.SetName(arbitrary_mailbox1); 576 arbitrary_resource1.mailbox_holder.mailbox.SetName(arbitrary_mailbox1);
581 arbitrary_resource1.mailbox_holder.texture_target = GL_TEXTURE_2D; 577 arbitrary_resource1.mailbox_holder.texture_target = GL_TEXTURE_2D;
582 arbitrary_resource1.mailbox_holder.sync_token = arbitrary_token1; 578 arbitrary_resource1.mailbox_holder.sync_token = arbitrary_token1;
583 arbitrary_resource1.is_overlay_candidate = true; 579 arbitrary_resource1.is_overlay_candidate = true;
(...skipping 24 matching lines...) Expand all
608 EXPECT_TRUE( 604 EXPECT_TRUE(
609 IPC::ParamTraits<DelegatedFrameData>::Read(&msg, &iter, &frame_out)); 605 IPC::ParamTraits<DelegatedFrameData>::Read(&msg, &iter, &frame_out));
610 606
611 ASSERT_EQ(2u, frame_out.resource_list.size()); 607 ASSERT_EQ(2u, frame_out.resource_list.size());
612 Compare(arbitrary_resource1, frame_out.resource_list[0]); 608 Compare(arbitrary_resource1, frame_out.resource_list[0]);
613 Compare(arbitrary_resource2, frame_out.resource_list[1]); 609 Compare(arbitrary_resource2, frame_out.resource_list[1]);
614 } 610 }
615 611
616 } // namespace 612 } // namespace
617 } // namespace content 613 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | cc/ipc/struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698