| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| index 814d46776a1ef00d205ad386066b3520058d4f2d..85154f06ca33e0ac05ae77324b9fc27ecd48008f 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -2227,6 +2227,7 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
|
| bool context_was_lost_;
|
| bool reset_by_robustness_extension_;
|
| bool supports_post_sub_buffer_;
|
| + bool supports_commit_overlay_planes_;
|
| bool supports_async_swap_;
|
|
|
| ContextType context_type_;
|
| @@ -2773,6 +2774,7 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group)
|
| context_was_lost_(false),
|
| reset_by_robustness_extension_(false),
|
| supports_post_sub_buffer_(false),
|
| + supports_commit_overlay_planes_(false),
|
| supports_async_swap_(false),
|
| context_type_(CONTEXT_TYPE_OPENGLES2),
|
| derivatives_explicitly_enabled_(false),
|
| @@ -3224,6 +3226,8 @@ bool GLES2DecoderImpl::Initialize(
|
| !surface->IsOffscreen())
|
| supports_post_sub_buffer_ = false;
|
|
|
| + supports_commit_overlay_planes_ = surface->SupportsCommitOverlayPlanes();
|
| +
|
| supports_async_swap_ = surface->SupportsAsyncSwap();
|
|
|
| if (feature_info_->workarounds().reverse_point_sprite_coord_origin) {
|
| @@ -3367,6 +3371,7 @@ Capabilities GLES2DecoderImpl::GetCapabilities() {
|
| #endif
|
|
|
| caps.post_sub_buffer = supports_post_sub_buffer_;
|
| + caps.commit_overlay_planes = supports_commit_overlay_planes_;
|
| caps.image = true;
|
| caps.surfaceless = surfaceless_;
|
|
|
| @@ -12000,8 +12005,13 @@ void GLES2DecoderImpl::FinishSwapBuffers(gfx::SwapResult result) {
|
| }
|
|
|
| void GLES2DecoderImpl::DoCommitOverlayPlanes() {
|
| - // TODO(watk): crbug.com/560592
|
| - NOTIMPLEMENTED();
|
| + TRACE_EVENT0("gpu", "GLES2DecoderImpl::DoCommitOverlayPlanes");
|
| + if (supports_async_swap_) {
|
| + surface_->CommitOverlayPlanesAsync(base::Bind(
|
| + &GLES2DecoderImpl::FinishSwapBuffers, base::AsWeakPtr(this)));
|
| + } else {
|
| + FinishSwapBuffers(surface_->CommitOverlayPlanes());
|
| + }
|
| }
|
|
|
| void GLES2DecoderImpl::DoSwapInterval(int interval) {
|
|
|