diff options
author | polina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-27 04:24:30 +0000 |
---|---|---|
committer | polina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-27 04:24:30 +0000 |
commit | 06e0a34ae11c97e35ae67f6a006dc4a45cda58af (patch) | |
tree | a6766fa80232f512030a7c68726c5c6137e5a52d /ppapi/c | |
parent | 325e9d2d3e52b4402c82c9b3c0c2163ef0f09020 (diff) | |
download | chromium_src-06e0a34ae11c97e35ae67f6a006dc4a45cda58af.zip chromium_src-06e0a34ae11c97e35ae67f6a006dc4a45cda58af.tar.gz chromium_src-06e0a34ae11c97e35ae67f6a006dc4a45cda58af.tar.bz2 |
Add PPB_Fullscreen_Dev;0.5. Keep 0.4 for backwards compatiblity and point it
to PPB_FlashFullscreen. The new implementation is based on
http://codereview.chromium.org/7714017/ with some bug fixes.
Update header comments.
Main API differences between the old and the new implementation:
- transition from fullscreen is now asynchronous and ends at DidChangeView
just like transition to fullscreen; graphics devices cannot be bound during
the transition.
- when switching to/from fullscreen 3D resources no longer need to be
re-created.
- transitions to fullscreen are only possible when processing user user gestures.
- transition to fullscreen results in 2 DidChangeViews, one for moving the
plugin to the middle of the window and one for stretching the window and
placing the plugin in the middle of the screen.
- the size of the plugin is not changed when going to/from fullscreen.
Testing:
- Mapped ppapi_tests:test_fullscreen to ppapi_tests:test_flash_fullscreen.
- Updated test_fullscreen to work with the new implementation. To be testable
automatically this needs enhancements to the testing infrastructure
for generating user gestures. For now marked the test as DISABLED.
- Disabled NaCl's ppapi_ppb_fullscreen_browser_test for the same reasons
as above.
- To re-enable both tests, we will first need to add user gesture capabilites
to PPB_Testing.
- Build 0.4 ppapi_test:test_fullscreen and ran this out of process and in
process with the newly build revision of chrome to verify backwards
compatability.
- In a separate CL, will update NaCl's ppapi_ppb_fullscreen_browser_test to work
with the new implementation, for now only manually.
BUG=41780
TEST=see above
Review URL: http://codereview.chromium.org/7826017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r-- | ppapi/c/dev/ppb_fullscreen_dev.h | 31 | ||||
-rw-r--r-- | ppapi/c/private/ppb_flash_fullscreen.h | 14 |
2 files changed, 27 insertions, 18 deletions
diff --git a/ppapi/c/dev/ppb_fullscreen_dev.h b/ppapi/c/dev/ppb_fullscreen_dev.h index d7bd528..bae1497 100644 --- a/ppapi/c/dev/ppb_fullscreen_dev.h +++ b/ppapi/c/dev/ppb_fullscreen_dev.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From dev/ppb_fullscreen_dev.idl modified Fri Aug 26 10:51:16 2011. */ +/* From dev/ppb_fullscreen_dev.idl modified Mon Sep 26 15:06:40 2011. */ #ifndef PPAPI_C_DEV_PPB_FULLSCREEN_DEV_H_ #define PPAPI_C_DEV_PPB_FULLSCREEN_DEV_H_ @@ -14,12 +14,12 @@ #include "ppapi/c/pp_size.h" #include "ppapi/c/pp_stdint.h" -#define PPB_FULLSCREEN_DEV_INTERFACE_0_4 "PPB_Fullscreen(Dev);0.4" -#define PPB_FULLSCREEN_DEV_INTERFACE PPB_FULLSCREEN_DEV_INTERFACE_0_4 +#define PPB_FULLSCREEN_DEV_INTERFACE_0_5 "PPB_Fullscreen(Dev);0.5" +#define PPB_FULLSCREEN_DEV_INTERFACE PPB_FULLSCREEN_DEV_INTERFACE_0_5 /** * @file - * This file defines the <code>PPB_Fullscreen</code> interface. + * This file defines the <code>PPB_Fullscreen_Dev</code> interface. */ @@ -36,20 +36,23 @@ struct PPB_Fullscreen_Dev { * Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on * success, PP_FALSE on failure. * - * This unbinds the current Graphics2D or Surface3D. Pending flushes and - * swapbuffers will execute as if the resource was off-screen. The transition - * is asynchronous. During the transition, IsFullscreen will return PP_False, - * and no Graphics2D or Surface3D can be bound. The transition ends at the - * next DidChangeView. + * This unbinds the current 2D or 3D devices. Pending flushes and swapbuffers + * will execute as if the resource was off-screen. The transition to and from + * fullscreen is asynchronous. During the transition, IsFullscreen will + * return the original value, and no 2D or 3D device can be bound. + * The transition ends at the next DidChangeView. * - * Note: when switching to and from fullscreen, Context3D and Surface3D - * resources need to be re-created. This is a current limitation that will be - * lifted in a later revision. + * The transition to fullscreen can only occur while the browser is + * processing a user gesture, even if PP_TRUE is returned. Note that two + * DidChangeView calls will happen when switching to fullscreen: + * one for moving the plugin to the middle of the window and one for + * stretching the window placing the plugin in the middle of the screen. + * Plugin size will not be affected. */ PP_Bool (*SetFullscreen)(PP_Instance instance, PP_Bool fullscreen); /** - * Gets the size of the screen. When going fullscreen, the instance will be - * resized to that size. + * Gets the size of the screen in pixels. When going fullscreen, the instance + * will be resized to that size. */ PP_Bool (*GetScreenSize)(PP_Instance instance, struct PP_Size* size); }; diff --git a/ppapi/c/private/ppb_flash_fullscreen.h b/ppapi/c/private/ppb_flash_fullscreen.h index d751e9e..23eef57 100644 --- a/ppapi/c/private/ppb_flash_fullscreen.h +++ b/ppapi/c/private/ppb_flash_fullscreen.h @@ -18,11 +18,18 @@ #define PPB_FLASHFULLSCREEN_INTERFACE PPB_FLASHFULLSCREEN_INTERFACE_0_1 /** + * PPB_Fullscreen is a copy of PPB_Fullscreen_Dev at rev 0.4. + * For backward compatibility keep the string for it until Flash is updated to + * use PPB_FlashFullscreen. + */ +#define PPB_FULLSCREEN_DEV_INTERFACE_0_4 "PPB_Fullscreen(Dev);0.4" + + +/** * @file * This file defines the <code>PPB_FlashFullscreen</code> interface. */ - /** * @addtogroup Interfaces * @{ @@ -37,8 +44,8 @@ struct PPB_FlashFullscreen { * success, PP_FALSE on failure. * * This unbinds the current Graphics2D or Surface3D. Pending flushes and - * swapbuffers will execute as if the resource was off-screen. The transition - * is asynchronous. During the transition, IsFullscreen will return PP_False, + * swapbuffers will execute as if the resource was off-screen. The transition + * is asynchronous. During the transition, IsFullscreen will return PP_FALSE, * and no Graphics2D or Surface3D can be bound. The transition ends at the * next DidChangeView when going into fullscreen mode. The transition out of * fullscreen mode is synchronous. @@ -59,4 +66,3 @@ struct PPB_FlashFullscreen { */ #endif /* PPAPI_C_PRIVATE_PPB_FLASH_FULLSCREEN_H_ */ - |