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

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

Issue 2173563002: Improve GL shader YUV adjustment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use enum hack Created 4 years, 4 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 "cc/ipc/filter_operation_struct_traits.h" 8 #include "cc/ipc/filter_operation_struct_traits.h"
9 #include "cc/ipc/filter_operations_struct_traits.h" 9 #include "cc/ipc/filter_operations_struct_traits.h"
10 #include "cc/ipc/quads.mojom.h" 10 #include "cc/ipc/quads.mojom.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 cc::YUVVideoDrawQuad::MaterialCast(&input); 382 cc::YUVVideoDrawQuad::MaterialCast(&input);
383 return quad->resource_offset; 383 return quad->resource_offset;
384 } 384 }
385 385
386 static float resource_multiplier(const cc::DrawQuad& input) { 386 static float resource_multiplier(const cc::DrawQuad& input) {
387 const cc::YUVVideoDrawQuad* quad = 387 const cc::YUVVideoDrawQuad* quad =
388 cc::YUVVideoDrawQuad::MaterialCast(&input); 388 cc::YUVVideoDrawQuad::MaterialCast(&input);
389 return quad->resource_multiplier; 389 return quad->resource_multiplier;
390 } 390 }
391 391
392 static uint32_t bits_per_channel(const cc::DrawQuad& input) {
393 const cc::YUVVideoDrawQuad* quad =
394 cc::YUVVideoDrawQuad::MaterialCast(&input);
395 return quad->bits_per_channel;
396 }
397
392 static bool Read(cc::mojom::YUVVideoQuadStateDataView data, 398 static bool Read(cc::mojom::YUVVideoQuadStateDataView data,
393 cc::DrawQuad* out); 399 cc::DrawQuad* out);
394 }; 400 };
395 401
396 struct DrawQuadWithSharedQuadState { 402 struct DrawQuadWithSharedQuadState {
397 const cc::DrawQuad* quad; 403 const cc::DrawQuad* quad;
398 bool include_sqs; 404 bool include_sqs;
399 }; 405 };
400 406
401 template <> 407 template <>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 (*iterator.it)->shared_quad_state; 511 (*iterator.it)->shared_quad_state;
506 return dq; 512 return dq;
507 } 513 }
508 514
509 static size_t GetSize(const cc::QuadList& input) { return input.size(); } 515 static size_t GetSize(const cc::QuadList& input) { return input.size(); }
510 }; 516 };
511 517
512 } // namespace mojo 518 } // namespace mojo
513 519
514 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_ 520 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698