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

Unified Diff: content/browser/renderer_host/gpu_message_filter.cc

Issue 111063003: Aura: Don't create GL context for CreateSharedSurfaceHandle() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to make tests happy by still creating shared context Created 6 years, 11 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/browser/renderer_host/gpu_message_filter.cc
diff --git a/content/browser/renderer_host/gpu_message_filter.cc b/content/browser/renderer_host/gpu_message_filter.cc
index 9068a4072ecf5f2b982360cfe2b1f007bac0e7b2..4dc49bb1f6ba55c06966b846994234cf9d989866 100644
--- a/content/browser/renderer_host/gpu_message_filter.cc
+++ b/content/browser/renderer_host/gpu_message_filter.cc
@@ -11,6 +11,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
+#include "content/browser/gpu/gpu_data_manager_impl_private.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
#include "content/browser/renderer_host/render_widget_helper.h"
@@ -94,24 +95,6 @@ bool GpuMessageFilter::OnMessageReceived(
return handled;
}
-void GpuMessageFilter::SurfaceUpdated(int32 surface_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- typedef std::vector<linked_ptr<CreateViewCommandBufferRequest> > RequestList;
- RequestList retry_requests;
- retry_requests.swap(pending_requests_);
- for (RequestList::iterator it = retry_requests.begin();
- it != retry_requests.end(); ++it) {
- if ((*it)->surface_id != surface_id) {
- pending_requests_.push_back(*it);
- } else {
- linked_ptr<CreateViewCommandBufferRequest> request = *it;
- OnCreateViewCommandBuffer(request->surface_id,
- request->init_params,
- request->reply.release());
- }
- }
-}
-
void GpuMessageFilter::BeginFrameSubscription(
int route_id,
scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) {
@@ -192,16 +175,10 @@ void GpuMessageFilter::OnCreateViewCommandBuffer(
<< " tried to access a surface for renderer " << renderer_id;
}
- if (compositing_surface.parent_gpu_process_id &&
- compositing_surface.parent_gpu_process_id != gpu_process_id_) {
- // If the current handle for the surface is using a different (older) gpu
- // host, it means the GPU process died and we need to wait until the UI
- // re-allocates the surface in the new process.
- linked_ptr<CreateViewCommandBufferRequest> request(
- new CreateViewCommandBufferRequest(
- surface_id, init_params, reply.Pass()));
- pending_requests_.push_back(request);
- return;
+ if (compositing_surface.parent_client_id &&
+ !GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) {
+ // For the renderer to fall back to software also.
+ compositing_surface = gfx::GLSurfaceHandle();
}
GpuProcessHost* host = GpuProcessHost::FromID(gpu_process_id_);
« no previous file with comments | « content/browser/renderer_host/gpu_message_filter.h ('k') | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698