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

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

Issue 2411793008: Adds BeginFrameControl via DevTools.
Patch Set: BFC prototype v2 with allow_latency_opts and waiting for BFOs. Created 4 years 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
« no previous file with comments | « cc/ipc/begin_frame_args.mojom ('k') | cc/ipc/cc_param_traits_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BEGIN_FRAME_ARGS_STRUCT_TRAITS_H_ 5 #ifndef CC_IPC_BEGIN_FRAME_ARGS_STRUCT_TRAITS_H_
6 #define CC_IPC_BEGIN_FRAME_ARGS_STRUCT_TRAITS_H_ 6 #define CC_IPC_BEGIN_FRAME_ARGS_STRUCT_TRAITS_H_
7 7
8 #include "cc/ipc/begin_frame_args.mojom-shared.h" 8 #include "cc/ipc/begin_frame_args.mojom-shared.h"
9 #include "cc/output/begin_frame_args.h" 9 #include "cc/output/begin_frame_args.h"
10 10
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 static cc::mojom::BeginFrameArgsType type(const cc::BeginFrameArgs& args) { 27 static cc::mojom::BeginFrameArgsType type(const cc::BeginFrameArgs& args) {
28 return static_cast<cc::mojom::BeginFrameArgsType>(args.type); 28 return static_cast<cc::mojom::BeginFrameArgsType>(args.type);
29 } 29 }
30 30
31 static bool on_critical_path(const cc::BeginFrameArgs& args) { 31 static bool on_critical_path(const cc::BeginFrameArgs& args) {
32 return args.on_critical_path; 32 return args.on_critical_path;
33 } 33 }
34 34
35 static bool allow_latency_optimizations(const cc::BeginFrameArgs& args) {
36 return args.allow_latency_optimizations;
37 }
38
35 static bool Read(cc::mojom::BeginFrameArgsDataView data, 39 static bool Read(cc::mojom::BeginFrameArgsDataView data,
36 cc::BeginFrameArgs* out) { 40 cc::BeginFrameArgs* out) {
37 if (!data.ReadFrameTime(&out->frame_time) || 41 if (!data.ReadFrameTime(&out->frame_time) ||
38 !data.ReadDeadline(&out->deadline) || 42 !data.ReadDeadline(&out->deadline) ||
39 !data.ReadInterval(&out->interval)) { 43 !data.ReadInterval(&out->interval)) {
40 return false; 44 return false;
41 } 45 }
42 out->type = 46 out->type =
43 static_cast<cc::BeginFrameArgs::BeginFrameArgsType>(data.type()); 47 static_cast<cc::BeginFrameArgs::BeginFrameArgsType>(data.type());
44 out->on_critical_path = data.on_critical_path(); 48 out->on_critical_path = data.on_critical_path();
49 out->allow_latency_optimizations = data.allow_latency_optimizations();
45 return true; 50 return true;
46 } 51 }
47 }; 52 };
48 53
49 } // namespace mojo 54 } // namespace mojo
50 55
51 #endif // CC_IPC_BEGIN_FRAME_ARGS_STRUCT_TRAITS_H_ 56 #endif // CC_IPC_BEGIN_FRAME_ARGS_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « cc/ipc/begin_frame_args.mojom ('k') | cc/ipc/cc_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698