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

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

Issue 12157002: Adding YUVA support for enabling Alpha Playback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing comments Created 7 years, 8 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
« cc/output/gl_renderer.cc ('K') | « 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 "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 EXPECT_EQ(a->tex_scale, b->tex_scale); 169 EXPECT_EQ(a->tex_scale, b->tex_scale);
170 EXPECT_EQ(a->y_plane.resource_id, b->y_plane.resource_id); 170 EXPECT_EQ(a->y_plane.resource_id, b->y_plane.resource_id);
171 EXPECT_EQ(a->y_plane.size.ToString(), b->y_plane.size.ToString()); 171 EXPECT_EQ(a->y_plane.size.ToString(), b->y_plane.size.ToString());
172 EXPECT_EQ(a->y_plane.format, b->y_plane.format); 172 EXPECT_EQ(a->y_plane.format, b->y_plane.format);
173 EXPECT_EQ(a->u_plane.resource_id, b->u_plane.resource_id); 173 EXPECT_EQ(a->u_plane.resource_id, b->u_plane.resource_id);
174 EXPECT_EQ(a->u_plane.size.ToString(), b->u_plane.size.ToString()); 174 EXPECT_EQ(a->u_plane.size.ToString(), b->u_plane.size.ToString());
175 EXPECT_EQ(a->u_plane.format, b->u_plane.format); 175 EXPECT_EQ(a->u_plane.format, b->u_plane.format);
176 EXPECT_EQ(a->v_plane.resource_id, b->v_plane.resource_id); 176 EXPECT_EQ(a->v_plane.resource_id, b->v_plane.resource_id);
177 EXPECT_EQ(a->v_plane.size.ToString(), b->v_plane.size.ToString()); 177 EXPECT_EQ(a->v_plane.size.ToString(), b->v_plane.size.ToString());
178 EXPECT_EQ(a->v_plane.format, b->v_plane.format); 178 EXPECT_EQ(a->v_plane.format, b->v_plane.format);
179 EXPECT_EQ(a->a_plane.resource_id, b->a_plane.resource_id);
180 EXPECT_EQ(a->a_plane.size.ToString(), b->a_plane.size.ToString());
181 EXPECT_EQ(a->a_plane.format, b->a_plane.format);
179 } 182 }
180 183
181 void Compare(const TransferableResource& a, const TransferableResource& b) { 184 void Compare(const TransferableResource& a, const TransferableResource& b) {
182 EXPECT_EQ(a.id, b.id); 185 EXPECT_EQ(a.id, b.id);
183 EXPECT_EQ(a.sync_point, b.sync_point); 186 EXPECT_EQ(a.sync_point, b.sync_point);
184 EXPECT_EQ(a.format, b.format); 187 EXPECT_EQ(a.format, b.format);
185 EXPECT_EQ(a.filter, b.filter); 188 EXPECT_EQ(a.filter, b.filter);
186 EXPECT_EQ(a.size.ToString(), b.size.ToString()); 189 EXPECT_EQ(a.size.ToString(), b.size.ToString());
187 for (size_t i = 0; i < arraysize(a.mailbox.name); ++i) 190 for (size_t i = 0; i < arraysize(a.mailbox.name); ++i)
188 EXPECT_EQ(a.mailbox.name[i], b.mailbox.name[i]); 191 EXPECT_EQ(a.mailbox.name[i], b.mailbox.name[i]);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 VideoLayerImpl::FramePlane arbitrary_plane2; 231 VideoLayerImpl::FramePlane arbitrary_plane2;
229 arbitrary_plane2.resource_id = arbitrary_resourceid; 232 arbitrary_plane2.resource_id = arbitrary_resourceid;
230 arbitrary_plane2.size = arbitrary_size2; 233 arbitrary_plane2.size = arbitrary_size2;
231 arbitrary_plane2.format = arbitrary_int; 234 arbitrary_plane2.format = arbitrary_int;
232 235
233 VideoLayerImpl::FramePlane arbitrary_plane3; 236 VideoLayerImpl::FramePlane arbitrary_plane3;
234 arbitrary_plane3.resource_id = arbitrary_resourceid; 237 arbitrary_plane3.resource_id = arbitrary_resourceid;
235 arbitrary_plane3.size = arbitrary_size3; 238 arbitrary_plane3.size = arbitrary_size3;
236 arbitrary_plane3.format = arbitrary_int; 239 arbitrary_plane3.format = arbitrary_int;
237 240
241 VideoLayerImpl::FramePlane arbitrary_plane4;
242 arbitrary_plane4.resource_id = arbitrary_resourceid;
243 arbitrary_plane4.size = arbitrary_size3;
244 arbitrary_plane4.format = arbitrary_int;
245
238 WebFilterOperations arbitrary_filters1; 246 WebFilterOperations arbitrary_filters1;
239 arbitrary_filters1.append(WebFilterOperation::createGrayscaleFilter( 247 arbitrary_filters1.append(WebFilterOperation::createGrayscaleFilter(
240 arbitrary_float1)); 248 arbitrary_float1));
241 249
242 WebFilterOperations arbitrary_filters2; 250 WebFilterOperations arbitrary_filters2;
243 arbitrary_filters2.append(WebFilterOperation::createBrightnessFilter( 251 arbitrary_filters2.append(WebFilterOperation::createBrightnessFilter(
244 arbitrary_float2)); 252 arbitrary_float2));
245 253
246 // TODO(danakj): filter is not serialized. 254 // TODO(danakj): filter is not serialized.
247 skia::RefPtr<SkImageFilter> arbitrary_filter; 255 skia::RefPtr<SkImageFilter> arbitrary_filter;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 tile_in->shared_quad_state); 387 tile_in->shared_quad_state);
380 388
381 scoped_ptr<YUVVideoDrawQuad> yuvvideo_in = 389 scoped_ptr<YUVVideoDrawQuad> yuvvideo_in =
382 YUVVideoDrawQuad::Create(); 390 YUVVideoDrawQuad::Create();
383 yuvvideo_in->SetAll(shared_state1_in.get(), 391 yuvvideo_in->SetAll(shared_state1_in.get(),
384 arbitrary_rect1, 392 arbitrary_rect1,
385 arbitrary_rect2, 393 arbitrary_rect2,
386 arbitrary_rect3, 394 arbitrary_rect3,
387 arbitrary_bool1, 395 arbitrary_bool1,
388 arbitrary_sizef1, 396 arbitrary_sizef1,
389 arbitrary_plane1, 397 &arbitrary_plane1,
390 arbitrary_plane2, 398 &arbitrary_plane2,
391 arbitrary_plane3); 399 &arbitrary_plane3,
400 &arbitrary_plane4);
392 scoped_ptr<DrawQuad> yuvvideo_cmp = yuvvideo_in->Copy( 401 scoped_ptr<DrawQuad> yuvvideo_cmp = yuvvideo_in->Copy(
393 yuvvideo_in->shared_quad_state); 402 yuvvideo_in->shared_quad_state);
394 403
395 scoped_ptr<RenderPass> pass_in = RenderPass::Create(); 404 scoped_ptr<RenderPass> pass_in = RenderPass::Create();
396 pass_in->SetAll(arbitrary_id, 405 pass_in->SetAll(arbitrary_id,
397 arbitrary_rect1, 406 arbitrary_rect1,
398 arbitrary_rectf1, 407 arbitrary_rectf1,
399 arbitrary_matrix, 408 arbitrary_matrix,
400 arbitrary_bool1, 409 arbitrary_bool1,
401 arbitrary_bool2); 410 arbitrary_bool2);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, 543 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
535 &iter, &frame_out)); 544 &iter, &frame_out));
536 545
537 ASSERT_EQ(2u, frame_out.resource_list.size()); 546 ASSERT_EQ(2u, frame_out.resource_list.size());
538 Compare(arbitrary_resource1, frame_out.resource_list[0]); 547 Compare(arbitrary_resource1, frame_out.resource_list[0]);
539 Compare(arbitrary_resource2, frame_out.resource_list[1]); 548 Compare(arbitrary_resource2, frame_out.resource_list[1]);
540 } 549 }
541 550
542 } // namespace 551 } // namespace
543 } // namespace content 552 } // namespace content
OLDNEW
« cc/output/gl_renderer.cc ('K') | « content/common/cc_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698