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

Side by Side Diff: ppapi/c/private/ppb_flash_fullscreen.h

Issue 10918182: Don't require a recreation of the context when fullscreening (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix style Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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 5
6 /* From private/ppb_flash_fullscreen.idl modified Wed Dec 14 18:08:00 2011. */ 6 /* From private/ppb_flash_fullscreen.idl modified Tue Sep 11 13:52:24 2012. */
7 7
8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_FULLSCREEN_H_ 8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_FULLSCREEN_H_
9 #define PPAPI_C_PRIVATE_PPB_FLASH_FULLSCREEN_H_ 9 #define PPAPI_C_PRIVATE_PPB_FLASH_FULLSCREEN_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h" 12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h" 13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_size.h" 14 #include "ppapi/c/pp_size.h"
15 #include "ppapi/c/pp_stdint.h" 15 #include "ppapi/c/pp_stdint.h"
16 16
17 #define PPB_FLASHFULLSCREEN_INTERFACE_0_1 "PPB_FlashFullscreen;0.1" 17 #define PPB_FLASHFULLSCREEN_INTERFACE_0_1 "PPB_FlashFullscreen;0.1"
18 #define PPB_FLASHFULLSCREEN_INTERFACE PPB_FLASHFULLSCREEN_INTERFACE_0_1 18 #define PPB_FLASHFULLSCREEN_INTERFACE_1_0 "PPB_FlashFullscreen;1.0"
19 #define PPB_FLASHFULLSCREEN_INTERFACE PPB_FLASHFULLSCREEN_INTERFACE_1_0
19 20
20 /** 21 /**
21 * @file 22 * @file
22 * This file defines the <code>PPB_FlashFullscreen</code> interface. 23 * This file defines the <code>PPB_FlashFullscreen</code> interface.
23 */ 24 */
24 25
25 26
26 /** 27 /**
27 * @addtogroup Interfaces 28 * @addtogroup Interfaces
28 * @{ 29 * @{
29 */ 30 */
30 struct PPB_FlashFullscreen_0_1 { 31 struct PPB_FlashFullscreen_1_0 {
31 /** 32 /**
32 * Checks whether the plugin instance is currently in fullscreen mode. 33 * Checks whether the plugin instance is currently in fullscreen mode.
33 */ 34 */
34 PP_Bool (*IsFullscreen)(PP_Instance instance); 35 PP_Bool (*IsFullscreen)(PP_Instance instance);
35 /** 36 /**
36 * Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on 37 * Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on
37 * success, PP_FALSE on failure. 38 * success, PP_FALSE on failure.
38 * 39 *
39 * This unbinds the current Graphics2D or Graphics3D. Pending flushes and 40 * This does not unbind the current Graphics2D or Graphics3D. Pending flushes
40 * swapbuffers will execute as if the resource was off-screen. The transition 41 * and swapbuffers will execute as if the resource was off-screen. The
41 * is asynchronous. During the transition, IsFullscreen will return PP_FALSE, 42 * transition is asynchronous. During the transition, IsFullscreen will
42 * and no Graphics2D or Graphics3D can be bound. The transition ends at the 43 * return PP_FALSE, and no Graphics2D or Graphics3D can be bound. The
43 * next DidChangeView when going into fullscreen mode. The transition out of 44 * transition ends at the next DidChangeView when going into fullscreen mode.
44 * fullscreen mode is synchronous. 45 * The transition out of fullscreen mode is synchronous.
45 *
46 * Note: when switching to and from fullscreen, Graphics3D resources need to
47 * be re-created. This is a current limitation that will be lifted in a later
48 * revision.
49 */ 46 */
50 PP_Bool (*SetFullscreen)(PP_Instance instance, PP_Bool fullscreen); 47 PP_Bool (*SetFullscreen)(PP_Instance instance, PP_Bool fullscreen);
51 /** 48 /**
52 * Gets the size of the screen in pixels. When going fullscreen, the instance 49 * Gets the size of the screen in pixels. When going fullscreen, the instance
53 * will be resized to that size. 50 * will be resized to that size.
54 */ 51 */
55 PP_Bool (*GetScreenSize)(PP_Instance instance, struct PP_Size* size); 52 PP_Bool (*GetScreenSize)(PP_Instance instance, struct PP_Size* size);
56 }; 53 };
57 54
58 typedef struct PPB_FlashFullscreen_0_1 PPB_FlashFullscreen; 55 typedef struct PPB_FlashFullscreen_1_0 PPB_FlashFullscreen;
56
57 struct PPB_FlashFullscreen_0_1 {
58 PP_Bool (*IsFullscreen)(PP_Instance instance);
59 PP_Bool (*SetFullscreen)(PP_Instance instance, PP_Bool fullscreen);
60 PP_Bool (*GetScreenSize)(PP_Instance instance, struct PP_Size* size);
61 };
59 /** 62 /**
60 * @} 63 * @}
61 */ 64 */
62 65
63 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_FULLSCREEN_H_ */ 66 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_FULLSCREEN_H_ */
64 67
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698