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

Side by Side Diff: cc/ipc/struct_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 | « cc/ipc/cc_param_traits_unittest.cc ('k') | gpu/GLES2/gl2extchromium.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "cc/input/selection.h" 6 #include "cc/input/selection.h"
7 #include "cc/ipc/traits_test_service.mojom.h" 7 #include "cc/ipc/traits_test_service.mojom.h"
8 #include "cc/quads/debug_border_draw_quad.h" 8 #include "cc/quads/debug_border_draw_quad.h"
9 #include "cc/quads/render_pass.h" 9 #include "cc/quads/render_pass.h"
10 #include "cc/quads/render_pass_draw_quad.h" 10 #include "cc/quads/render_pass_draw_quad.h"
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 EXPECT_EQ(blend_mode, output_sqs.blend_mode); 813 EXPECT_EQ(blend_mode, output_sqs.blend_mode);
814 EXPECT_EQ(sorting_context_id, output_sqs.sorting_context_id); 814 EXPECT_EQ(sorting_context_id, output_sqs.sorting_context_id);
815 } 815 }
816 816
817 TEST_F(StructTraitsTest, TransferableResource) { 817 TEST_F(StructTraitsTest, TransferableResource) {
818 const uint32_t id = 1337; 818 const uint32_t id = 1337;
819 const ResourceFormat format = ALPHA_8; 819 const ResourceFormat format = ALPHA_8;
820 const uint32_t filter = 1234; 820 const uint32_t filter = 1234;
821 const gfx::Size size(1234, 5678); 821 const gfx::Size size(1234, 5678);
822 const int8_t mailbox_name[GL_MAILBOX_SIZE_CHROMIUM] = { 822 const int8_t mailbox_name[GL_MAILBOX_SIZE_CHROMIUM] = {
823 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 823 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2};
824 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7,
825 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7};
826 const gpu::CommandBufferNamespace command_buffer_namespace = gpu::IN_PROCESS; 824 const gpu::CommandBufferNamespace command_buffer_namespace = gpu::IN_PROCESS;
827 const int32_t extra_data_field = 0xbeefbeef; 825 const int32_t extra_data_field = 0xbeefbeef;
828 const gpu::CommandBufferId command_buffer_id( 826 const gpu::CommandBufferId command_buffer_id(
829 gpu::CommandBufferId::FromUnsafeValue(0xdeadbeef)); 827 gpu::CommandBufferId::FromUnsafeValue(0xdeadbeef));
830 const uint64_t release_count = 0xdeadbeefdeadL; 828 const uint64_t release_count = 0xdeadbeefdeadL;
831 const uint32_t texture_target = 1337; 829 const uint32_t texture_target = 1337;
832 const bool read_lock_fences_enabled = true; 830 const bool read_lock_fences_enabled = true;
833 const bool is_software = false; 831 const bool is_software = false;
834 const bool is_overlay_candidate = true; 832 const bool is_overlay_candidate = true;
835 833
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 EXPECT_EQ(u_plane_resource_id, out_quad->u_plane_resource_id()); 916 EXPECT_EQ(u_plane_resource_id, out_quad->u_plane_resource_id());
919 EXPECT_EQ(v_plane_resource_id, out_quad->v_plane_resource_id()); 917 EXPECT_EQ(v_plane_resource_id, out_quad->v_plane_resource_id());
920 EXPECT_EQ(a_plane_resource_id, out_quad->a_plane_resource_id()); 918 EXPECT_EQ(a_plane_resource_id, out_quad->a_plane_resource_id());
921 EXPECT_EQ(color_space, out_quad->color_space); 919 EXPECT_EQ(color_space, out_quad->color_space);
922 EXPECT_EQ(resource_offset, out_quad->resource_offset); 920 EXPECT_EQ(resource_offset, out_quad->resource_offset);
923 EXPECT_EQ(resource_multiplier, out_quad->resource_multiplier); 921 EXPECT_EQ(resource_multiplier, out_quad->resource_multiplier);
924 EXPECT_EQ(bits_per_channel, out_quad->bits_per_channel); 922 EXPECT_EQ(bits_per_channel, out_quad->bits_per_channel);
925 } 923 }
926 924
927 } // namespace cc 925 } // namespace cc
OLDNEW
« no previous file with comments | « cc/ipc/cc_param_traits_unittest.cc ('k') | gpu/GLES2/gl2extchromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698