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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 9703024: Replacing GLSurface::SetVisibility with SetBufferAllocation for more explicit management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/gpu/image_transport_surface_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 43129fae7bc8b3bc09aa81f0cbc874db56f50a54..96ca0ea68ab85ff030ddaac2a1a4a1494614602e 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -564,7 +564,8 @@ void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) {
void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) {
if (visible)
- surface_->SetVisibility(gfx::GLSurface::VISIBILITY_STATE_FOREGROUND);
+ surface_->SetBufferAllocation(
+ gfx::GLSurface::BUFFER_ALLOCATION_FRONT_AND_BACK);
DCHECK(surface_state_.get());
surface_state_->visible = visible;
surface_state_->last_used_time = base::TimeTicks::Now();
@@ -625,11 +626,14 @@ void GpuCommandBufferStub::SetMemoryAllocation(
if (!surface_)
return;
if (allocation.has_frontbuffer && allocation.has_backbuffer)
- surface_->SetVisibility(gfx::GLSurface::VISIBILITY_STATE_FOREGROUND);
+ surface_->SetBufferAllocation(
+ gfx::GLSurface::BUFFER_ALLOCATION_FRONT_AND_BACK);
else if (allocation.has_frontbuffer)
- surface_->SetVisibility(gfx::GLSurface::VISIBILITY_STATE_BACKGROUND);
+ surface_->SetBufferAllocation(
+ gfx::GLSurface::BUFFER_ALLOCATION_FRONT_ONLY);
else
- surface_->SetVisibility(gfx::GLSurface::VISIBILITY_STATE_HIBERNATED);
+ surface_->SetBufferAllocation(
+ gfx::GLSurface::BUFFER_ALLOCATION_NONE);
}
#endif // defined(ENABLE_GPU)
« no previous file with comments | « no previous file | content/common/gpu/image_transport_surface_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698