OLD | NEW |
(Empty) | |
| 1 /* Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. |
| 4 */ |
| 5 |
| 6 /* From private/ppb_input_event_private.idl, |
| 7 * modified Tue May 20 18:31:39 2014. |
| 8 */ |
| 9 |
| 10 #ifndef PPAPI_C_PRIVATE_PPB_INPUT_EVENT_PRIVATE_H_ |
| 11 #define PPAPI_C_PRIVATE_PPB_INPUT_EVENT_PRIVATE_H_ |
| 12 |
| 13 #include "ppapi/c/pp_bool.h" |
| 14 #include "ppapi/c/pp_instance.h" |
| 15 #include "ppapi/c/pp_macros.h" |
| 16 #include "ppapi/c/pp_resource.h" |
| 17 #include "ppapi/c/pp_stdint.h" |
| 18 |
| 19 #define PPB_INPUTEVENT_PRIVATE_INTERFACE_0_1 "PPB_InputEvent_Private;0.1" |
| 20 #define PPB_INPUTEVENT_PRIVATE_INTERFACE PPB_INPUTEVENT_PRIVATE_INTERFACE_0_1 |
| 21 |
| 22 /** |
| 23 * @file |
| 24 * This file defines the PPB_InputEvent_Private interfaces. |
| 25 */ |
| 26 |
| 27 |
| 28 /** |
| 29 * @addtogroup Interfaces |
| 30 * @{ |
| 31 */ |
| 32 /** |
| 33 * The <code>PPB_InputEvent_Private</code> interface contains pointers to |
| 34 several |
| 35 * functions related to generic input events on the browser. |
| 36 */ |
| 37 struct PPB_InputEvent_Private_0_1 { |
| 38 /** |
| 39 * TraceInputLatency() traces the latency of the input event. The input |
| 40 * latency is shown in the trace viewer. The starting point of the input |
| 41 * latency is when the input event is sent from renderer to plugin. If the |
| 42 * input event does not cause any rendering damage, the end point of input |
| 43 * latency is when TraceInputLatency() is called on the event. If the input |
| 44 * event does cause rendering damage, the end point of input latency is when |
| 45 * the resulted plugin frame eventually reaches screen. |
| 46 * |
| 47 * Notes: In the current version, only Graphics2D damage is considered as |
| 48 * rendering damage. And it works only when the Graphics2Ds are bound to |
| 49 * the plugin instance. |
| 50 * |
| 51 * @param[in] event A <code>PP_Resource</code> corresponding to an input |
| 52 * event. |
| 53 * |
| 54 * @param[in] has_damage A bool indicating whether the event has caused any |
| 55 * rendering damage. |
| 56 * |
| 57 * @return <code>PP_TRUE</code> if the latency for the given event is tracked. |
| 58 */ |
| 59 PP_Bool (*TraceInputLatency)(PP_Resource event, PP_Bool has_damage); |
| 60 /** |
| 61 * StartTrackingLatency() requests input latency to be tracked. |
| 62 * |
| 63 * Without calling StartTrackingLatency() first, TraceInputLatency() won't |
| 64 * take effect. |
| 65 * |
| 66 * @param[in] instance The <code>PP_Instance</code> of the instance requesting |
| 67 * to start tracking input latency. |
| 68 */ |
| 69 void (*StartTrackingLatency)(PP_Instance instance); |
| 70 }; |
| 71 |
| 72 typedef struct PPB_InputEvent_Private_0_1 PPB_InputEvent_Private; |
| 73 /** |
| 74 * @} |
| 75 */ |
| 76 |
| 77 #endif /* PPAPI_C_PRIVATE_PPB_INPUT_EVENT_PRIVATE_H_ */ |
| 78 |
OLD | NEW |