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

Side by Side Diff: content/browser/renderer_host/gpu_message_filter.cc

Issue 12547016: Enable browser plugin compositing by default, but add a flag to disable it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #endif 7 #endif
8 8
9 #include "content/browser/renderer_host/gpu_message_filter.h" 9 #include "content/browser/renderer_host/gpu_message_filter.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 render_widget_helper_(render_widget_helper), 42 render_widget_helper_(render_widget_helper),
43 weak_ptr_factory_(this) { 43 weak_ptr_factory_(this) {
44 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 44 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
45 45
46 #if defined(USE_AURA) || defined(OS_ANDROID) 46 #if defined(USE_AURA) || defined(OS_ANDROID)
47 // We use the GPU process for UI on Aura, and we need to share renderer GL 47 // We use the GPU process for UI on Aura, and we need to share renderer GL
48 // contexts with the compositor context. 48 // contexts with the compositor context.
49 share_contexts_ = true; 49 share_contexts_ = true;
50 #else 50 #else
51 // Share contexts when compositing webview plugin. 51 // Share contexts when compositing webview plugin.
52 // Keep this behind a flag for now until we can run a 52 if (!CommandLine::ForCurrentProcess()->HasSwitch(
53 // stability experiment. 53 switches::kDisableBrowserPluginCompositing))
54 if (CommandLine::ForCurrentProcess()->HasSwitch(
55 switches::kEnableBrowserPluginCompositing))
56 share_contexts_ = true; 54 share_contexts_ = true;
57 #endif 55 #endif
58 } 56 }
59 57
60 GpuMessageFilter::~GpuMessageFilter() { 58 GpuMessageFilter::~GpuMessageFilter() {
61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 59 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
62 } 60 }
63 61
64 bool GpuMessageFilter::OnMessageReceived( 62 bool GpuMessageFilter::OnMessageReceived(
65 const IPC::Message& message, 63 const IPC::Message& message,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 187 }
190 188
191 void GpuMessageFilter::CreateCommandBufferCallback( 189 void GpuMessageFilter::CreateCommandBufferCallback(
192 IPC::Message* reply, int32 route_id) { 190 IPC::Message* reply, int32 route_id) {
193 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 191 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
194 GpuHostMsg_CreateViewCommandBuffer::WriteReplyParams(reply, route_id); 192 GpuHostMsg_CreateViewCommandBuffer::WriteReplyParams(reply, route_id);
195 Send(reply); 193 Send(reply);
196 } 194 }
197 195
198 } // namespace content 196 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698