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

Unified Diff: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc

Issue 7890046: Command to mark surface inactive, so gpu process can release resources. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: first cut of IPC version Created 9 years, 2 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
Index: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc
diff --git a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc
index 4def872429965a980b8e30178450580ab1ca312d..cd9f1f5658e7db2bb732fd8e063bfd2da57f1773 100644
--- a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc
@@ -24,6 +24,7 @@
#include "base/metrics/histogram.h"
#include "base/synchronization/lock.h"
#include "content/common/content_switches.h"
+#include "content/renderer/gpu/command_buffer_proxy.h"
#include "content/renderer/gpu/gpu_channel_host.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
@@ -268,6 +269,12 @@ void WebGraphicsContext3DCommandBufferImpl::reshape(int width, int height) {
#endif // FLIP_FRAMEBUFFER_VERTICALLY
}
+void WebGraphicsContext3DCommandBufferImpl::setVisibility(bool visible) {
+ gl_->Flush();
+ // TODO(mmocny): Should context_ have a SetSurfaceVisible which forwards?
+ context_->GetCommandBufferProxy()->SetSurfaceVisible(visible);
mmocny 2011/10/13 18:54:17 RE TODO: I'm leaning towards having RendererGLCont
jonathan.backer 2011/10/13 19:25:07 I'm OK with it as is. There's one surface per comm
apatrick_chromium 2011/10/13 19:51:31 I lean towards a forwarding function. Law of demet
+}
+
#ifdef FLIP_FRAMEBUFFER_VERTICALLY
void WebGraphicsContext3DCommandBufferImpl::FlipVertically(
uint8* framebuffer,

Powered by Google App Engine
This is Rietveld 408576698