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

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

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 #include "cc/ipc/quads_struct_traits.h" 5 #include "cc/ipc/quads_struct_traits.h"
6 #include "ui/gfx/mojo/transform_struct_traits.h" 6 #include "ui/gfx/mojo/transform_struct_traits.h"
7 7
8 namespace mojo { 8 namespace mojo {
9 9
10 cc::DrawQuad* AllocateAndConstruct( 10 cc::DrawQuad* AllocateAndConstruct(
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 if (!data.ReadColorSpace(&quad->color_space)) 249 if (!data.ReadColorSpace(&quad->color_space))
250 return false; 250 return false;
251 quad->resource_offset = data.resource_offset(); 251 quad->resource_offset = data.resource_offset();
252 quad->resource_multiplier = data.resource_multiplier(); 252 quad->resource_multiplier = data.resource_multiplier();
253 quad->bits_per_channel = data.bits_per_channel(); 253 quad->bits_per_channel = data.bits_per_channel();
254 if (quad->bits_per_channel < cc::YUVVideoDrawQuad::kMinBitsPerChannel || 254 if (quad->bits_per_channel < cc::YUVVideoDrawQuad::kMinBitsPerChannel ||
255 quad->bits_per_channel > cc::YUVVideoDrawQuad::kMaxBitsPerChannel) { 255 quad->bits_per_channel > cc::YUVVideoDrawQuad::kMaxBitsPerChannel) {
256 return false; 256 return false;
257 } 257 }
258 quad->require_overlay = data.require_overlay();
258 return true; 259 return true;
259 } 260 }
260 261
261 // static 262 // static
262 bool StructTraits<cc::mojom::DrawQuadDataView, cc::DrawQuad>::Read( 263 bool StructTraits<cc::mojom::DrawQuadDataView, cc::DrawQuad>::Read(
263 cc::mojom::DrawQuadDataView data, 264 cc::mojom::DrawQuadDataView data,
264 cc::DrawQuad* out) { 265 cc::DrawQuad* out) {
265 if (!data.ReadRect(&out->rect) || !data.ReadOpaqueRect(&out->opaque_rect) || 266 if (!data.ReadRect(&out->rect) || !data.ReadOpaqueRect(&out->opaque_rect) ||
266 !data.ReadVisibleRect(&out->visible_rect)) { 267 !data.ReadVisibleRect(&out->visible_rect)) {
267 return false; 268 return false;
268 } 269 }
269 out->needs_blending = data.needs_blending(); 270 out->needs_blending = data.needs_blending();
270 return data.ReadDrawQuadState(out); 271 return data.ReadDrawQuadState(out);
271 } 272 }
272 273
273 } // namespace mojo 274 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698