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

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

Issue 1365563002: Make channel preemption not require view contexts for hookup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wakeup_gpu
Patch Set: rebase Created 5 years, 3 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 | « content/common/gpu/image_transport_surface.h ('k') | content/common/gpu/image_transport_surface_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface.cc
diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc
index efcd04fec5efe9a7b0fa79f3b9a422a9933eeff6..1cdbd801e256a49872ed1c2a4b07ee56f09b2386 100644
--- a/content/common/gpu/image_transport_surface.cc
+++ b/content/common/gpu/image_transport_surface.cc
@@ -12,7 +12,6 @@
#include "content/common/gpu/gpu_channel_manager.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
#include "content/common/gpu/gpu_messages.h"
-#include "content/public/common/content_switches.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
#include "ui/gfx/vsync_provider.h"
#include "ui/gl/gl_context.h"
@@ -31,15 +30,6 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
const gfx::GLSurfaceHandle& handle) {
scoped_refptr<gfx::GLSurface> surface;
if (handle.transport_type == gfx::NULL_TRANSPORT) {
- GpuChannel* parent_channel = manager->LookupChannel(
- handle.parent_client_id);
- if (parent_channel) {
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess))
- stub->channel()->SetPreemptByFlag(parent_channel->GetPreemptionFlag());
- }
-
surface = manager->GetDefaultOffscreenSurface();
} else {
surface = CreateNativeSurface(manager, stub, handle);
@@ -109,17 +99,14 @@ void ImageTransportHelper::SendAcceleratedSurfaceBuffersSwapped(
TRACE_EVENT_SCOPE_THREAD,
"GLImpl", static_cast<int>(gfx::GetGLImplementation()),
"width", params.size.width());
- params.surface_id = stub_->surface_id();
+ // On mac, handle_ is a surface id. See
+ // GpuProcessTransportFactory::CreatePerCompositorData
+ params.surface_id = handle_;
params.route_id = route_id_;
manager_->Send(new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params));
}
#endif
-void ImageTransportHelper::SetPreemptByFlag(
- scoped_refptr<gpu::PreemptionFlag> preemption_flag) {
- stub_->channel()->SetPreemptByFlag(preemption_flag);
-}
-
bool ImageTransportHelper::MakeCurrent() {
gpu::gles2::GLES2Decoder* decoder = Decoder();
if (!decoder)
« no previous file with comments | « content/common/gpu/image_transport_surface.h ('k') | content/common/gpu/image_transport_surface_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698