| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |