ppapi: Add support for single buffer contexts.
BUG=732473 Change-Id: Ib89549a861016f0927bb6dfac2586be6e0ba1932 Reviewed-on: https://chromium-review.googlesource.com/529925 Reviewed-by: Jochen Eisinger <jochen@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: David Reveman <reveman@chromium.org> Cr-Commit-Position: refs/heads/master@{#479023}
This commit is contained in:

committed by
Commit Bot

parent
5520d58a9a
commit
ca46de7342
@ -79,5 +79,10 @@
|
||||
/**
|
||||
* The context may be high-power and may be created on a discrete gpu.
|
||||
*/
|
||||
PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE = 0x11002
|
||||
PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE = 0x11002,
|
||||
/**
|
||||
* Whether or not offscreen color buffers exist in front/back pairs that
|
||||
* can be swapped.
|
||||
*/
|
||||
PP_GRAPHICS3DATTRIB_SINGLE_BUFFER = 0x3085
|
||||
};
|
||||
|
@ -3,7 +3,7 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
/* From pp_graphics_3d.idl modified Wed Oct 3 15:55:01 2012. */
|
||||
/* From pp_graphics_3d.idl modified Fri Jun 9 15:44:15 2017. */
|
||||
|
||||
#ifndef PPAPI_C_PP_GRAPHICS_3D_H_
|
||||
#define PPAPI_C_PP_GRAPHICS_3D_H_
|
||||
@ -92,7 +92,12 @@ typedef enum {
|
||||
/**
|
||||
* The context may be high-power and may be created on a discrete gpu.
|
||||
*/
|
||||
PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE = 0x11002
|
||||
PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE = 0x11002,
|
||||
/**
|
||||
* Whether or not offscreen color buffers exist in front/back pairs that
|
||||
* can be swapped.
|
||||
*/
|
||||
PP_GRAPHICS3DATTRIB_SINGLE_BUFFER = 0x3085
|
||||
} PP_Graphics3DAttrib;
|
||||
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Graphics3DAttrib, 4);
|
||||
/**
|
||||
|
@ -193,6 +193,9 @@ PP_Resource PPB_Graphics3D_Proxy::CreateProxyResource(
|
||||
? gl::PreferIntegratedGpu
|
||||
: gl::PreferDiscreteGpu;
|
||||
break;
|
||||
case PP_GRAPHICS3DATTRIB_SINGLE_BUFFER:
|
||||
attrib_helper.single_buffer = !!attr[1];
|
||||
break;
|
||||
default:
|
||||
attribs.push_back(attr[0]);
|
||||
attribs.push_back(attr[1]);
|
||||
|
Reference in New Issue
Block a user