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

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

Issue 12157002: Adding YUVA support for enabling Alpha Playback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove files unrelated to cc/ Created 7 years, 10 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
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 "cc/compositor_frame.h" 7 #include "cc/compositor_frame.h"
8 #include "content/public/common/common_param_traits.h" 8 #include "content/public/common/common_param_traits.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 break; 326 break;
327 case cc::DrawQuad::TILED_CONTENT: 327 case cc::DrawQuad::TILED_CONTENT:
328 WriteParam(m, *cc::TileDrawQuad::MaterialCast(quad)); 328 WriteParam(m, *cc::TileDrawQuad::MaterialCast(quad));
329 break; 329 break;
330 case cc::DrawQuad::STREAM_VIDEO_CONTENT: 330 case cc::DrawQuad::STREAM_VIDEO_CONTENT:
331 WriteParam(m, *cc::StreamVideoDrawQuad::MaterialCast(quad)); 331 WriteParam(m, *cc::StreamVideoDrawQuad::MaterialCast(quad));
332 break; 332 break;
333 case cc::DrawQuad::YUV_VIDEO_CONTENT: 333 case cc::DrawQuad::YUV_VIDEO_CONTENT:
334 WriteParam(m, *cc::YUVVideoDrawQuad::MaterialCast(quad)); 334 WriteParam(m, *cc::YUVVideoDrawQuad::MaterialCast(quad));
335 break; 335 break;
336 case cc::DrawQuad::YUVA_VIDEO_CONTENT:
337 WriteParam(m, *cc::YUVAVideoDrawQuad::MaterialCast(quad));
338 break;
336 case cc::DrawQuad::INVALID: 339 case cc::DrawQuad::INVALID:
337 break; 340 break;
338 } 341 }
339 342
340 const cc::ScopedPtrVector<cc::SharedQuadState>& sqs_list = 343 const cc::ScopedPtrVector<cc::SharedQuadState>& sqs_list =
341 p.shared_quad_state_list; 344 p.shared_quad_state_list;
342 345
343 // This is an invalid index. 346 // This is an invalid index.
344 size_t bad_index = sqs_list.size(); 347 size_t bad_index = sqs_list.size();
345 348
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 break; 443 break;
441 case cc::DrawQuad::TILED_CONTENT: 444 case cc::DrawQuad::TILED_CONTENT:
442 draw_quad = ReadDrawQuad<cc::TileDrawQuad>(m, iter); 445 draw_quad = ReadDrawQuad<cc::TileDrawQuad>(m, iter);
443 break; 446 break;
444 case cc::DrawQuad::STREAM_VIDEO_CONTENT: 447 case cc::DrawQuad::STREAM_VIDEO_CONTENT:
445 draw_quad = ReadDrawQuad<cc::StreamVideoDrawQuad>(m, iter); 448 draw_quad = ReadDrawQuad<cc::StreamVideoDrawQuad>(m, iter);
446 break; 449 break;
447 case cc::DrawQuad::YUV_VIDEO_CONTENT: 450 case cc::DrawQuad::YUV_VIDEO_CONTENT:
448 draw_quad = ReadDrawQuad<cc::YUVVideoDrawQuad>(m, iter); 451 draw_quad = ReadDrawQuad<cc::YUVVideoDrawQuad>(m, iter);
449 break; 452 break;
453 case cc::DrawQuad::YUVA_VIDEO_CONTENT:
454 draw_quad = ReadDrawQuad<cc::YUVAVideoDrawQuad>(m, iter);
455 break;
450 case cc::DrawQuad::INVALID: 456 case cc::DrawQuad::INVALID:
451 break; 457 break;
452 } 458 }
453 if (!draw_quad) 459 if (!draw_quad)
454 return false; 460 return false;
455 461
456 size_t shared_quad_state_index; 462 size_t shared_quad_state_index;
457 if (!ReadParam(m, iter, &shared_quad_state_index) || 463 if (!ReadParam(m, iter, &shared_quad_state_index) ||
458 shared_quad_state_index >= p->shared_quad_state_list.size()) 464 shared_quad_state_index >= p->shared_quad_state_list.size())
459 return false; 465 return false;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 break; 525 break;
520 case cc::DrawQuad::TILED_CONTENT: 526 case cc::DrawQuad::TILED_CONTENT:
521 LogParam(*cc::TileDrawQuad::MaterialCast(quad), l); 527 LogParam(*cc::TileDrawQuad::MaterialCast(quad), l);
522 break; 528 break;
523 case cc::DrawQuad::STREAM_VIDEO_CONTENT: 529 case cc::DrawQuad::STREAM_VIDEO_CONTENT:
524 LogParam(*cc::StreamVideoDrawQuad::MaterialCast(quad), l); 530 LogParam(*cc::StreamVideoDrawQuad::MaterialCast(quad), l);
525 break; 531 break;
526 case cc::DrawQuad::YUV_VIDEO_CONTENT: 532 case cc::DrawQuad::YUV_VIDEO_CONTENT:
527 LogParam(*cc::YUVVideoDrawQuad::MaterialCast(quad), l); 533 LogParam(*cc::YUVVideoDrawQuad::MaterialCast(quad), l);
528 break; 534 break;
535 case cc::DrawQuad::YUVA_VIDEO_CONTENT:
536 LogParam(*cc::YUVAVideoDrawQuad::MaterialCast(quad), l);
537 break;
529 case cc::DrawQuad::INVALID: 538 case cc::DrawQuad::INVALID:
530 break; 539 break;
531 } 540 }
532 } 541 }
533 l->append("])"); 542 l->append("])");
534 } 543 }
535 544
536 void ParamTraits<cc::Mailbox>::Write(Message* m, const param_type& p) { 545 void ParamTraits<cc::Mailbox>::Write(Message* m, const param_type& p) {
537 m->WriteBytes(p.name, sizeof(p.name)); 546 m->WriteBytes(p.name, sizeof(p.name));
538 } 547 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 l->append(", ["); 660 l->append(", [");
652 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { 661 for (size_t i = 0; i < p.render_pass_list.size(); ++i) {
653 if (i) 662 if (i)
654 l->append(", "); 663 l->append(", ");
655 LogParam(*p.render_pass_list[i], l); 664 LogParam(*p.render_pass_list[i], l);
656 } 665 }
657 l->append("])"); 666 l->append("])");
658 } 667 }
659 668
660 } // namespace IPC 669 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698