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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1477593002: gpu: Initial implementation of CommitOverlayPlanes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-cop-command
Patch Set: Remove NativeViewGLSurfaceEGL changes Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/common/capabilities.cc ('k') | gpu/ipc/gpu_command_buffer_traits_multi.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eabf876ba6d736369b5eafd0172839b1d7694fcd..0cc27711de50e55c3e89cd6f3ca4b249473572ba 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1980,6 +1980,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_;
@@ -2526,6 +2527,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),
@@ -2977,6 +2979,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) {
@@ -3120,6 +3124,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_;
@@ -11785,8 +11790,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) {
« no previous file with comments | « gpu/command_buffer/common/capabilities.cc ('k') | gpu/ipc/gpu_command_buffer_traits_multi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698