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

Side by Side Diff: cc/ipc/quads_struct_traits.h

Issue 2919863004: Add flag to signal that video frame must be drawn using an overlay. (Closed)
Patch Set: cleanup Created 3 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
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 #ifndef CC_IPC_QUADS_STRUCT_TRAITS_H_ 5 #ifndef CC_IPC_QUADS_STRUCT_TRAITS_H_
6 #define CC_IPC_QUADS_STRUCT_TRAITS_H_ 6 #define CC_IPC_QUADS_STRUCT_TRAITS_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/ipc/filter_operation_struct_traits.h" 9 #include "cc/ipc/filter_operation_struct_traits.h"
10 #include "cc/ipc/filter_operations_struct_traits.h" 10 #include "cc/ipc/filter_operations_struct_traits.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 static uint32_t bits_per_channel(const cc::DrawQuad& input) { 413 static uint32_t bits_per_channel(const cc::DrawQuad& input) {
414 const cc::YUVVideoDrawQuad* quad = 414 const cc::YUVVideoDrawQuad* quad =
415 cc::YUVVideoDrawQuad::MaterialCast(&input); 415 cc::YUVVideoDrawQuad::MaterialCast(&input);
416 return quad->bits_per_channel; 416 return quad->bits_per_channel;
417 } 417 }
418 static gfx::ColorSpace video_color_space(const cc::DrawQuad& input) { 418 static gfx::ColorSpace video_color_space(const cc::DrawQuad& input) {
419 const cc::YUVVideoDrawQuad* quad = 419 const cc::YUVVideoDrawQuad* quad =
420 cc::YUVVideoDrawQuad::MaterialCast(&input); 420 cc::YUVVideoDrawQuad::MaterialCast(&input);
421 return quad->video_color_space; 421 return quad->video_color_space;
422 } 422 }
423 static bool require_overlay(const cc::DrawQuad& input) {
424 const cc::YUVVideoDrawQuad* quad =
425 cc::YUVVideoDrawQuad::MaterialCast(&input);
426 return quad->require_overlay;
427 }
423 428
424 static bool Read(cc::mojom::YUVVideoQuadStateDataView data, 429 static bool Read(cc::mojom::YUVVideoQuadStateDataView data,
425 cc::DrawQuad* out); 430 cc::DrawQuad* out);
426 }; 431 };
427 432
428 struct DrawQuadWithSharedQuadState { 433 struct DrawQuadWithSharedQuadState {
429 const cc::DrawQuad* quad; 434 const cc::DrawQuad* quad;
430 const cc::SharedQuadState* shared_quad_state; 435 const cc::SharedQuadState* shared_quad_state;
431 }; 436 };
432 437
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 dq.shared_quad_state = current_sqs; 500 dq.shared_quad_state = current_sqs;
496 return dq; 501 return dq;
497 } 502 }
498 503
499 static size_t GetSize(const cc::QuadList& input) { return input.size(); } 504 static size_t GetSize(const cc::QuadList& input) { return input.size(); }
500 }; 505 };
501 506
502 } // namespace mojo 507 } // namespace mojo
503 508
504 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_ 509 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698