| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 5 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 using content::BrowserThread; | 29 using content::BrowserThread; |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 // One of the linux specific headers defines this as a macro. | 33 // One of the linux specific headers defines this as a macro. |
| 34 #ifdef DestroyAll | 34 #ifdef DestroyAll |
| 35 #undef DestroyAll | 35 #undef DestroyAll |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 base::LazyInstance<IDMap<GpuProcessHostUIShim> > g_hosts_by_id( | 38 base::LazyInstance<IDMap<GpuProcessHostUIShim> > g_hosts_by_id = |
| 39 base::LINKER_INITIALIZED); | 39 LINKER_ZERO_INITIALIZED; |
| 40 | 40 |
| 41 class SendOnIOThreadTask : public Task { | 41 class SendOnIOThreadTask : public Task { |
| 42 public: | 42 public: |
| 43 SendOnIOThreadTask(int host_id, IPC::Message* msg) | 43 SendOnIOThreadTask(int host_id, IPC::Message* msg) |
| 44 : host_id_(host_id), | 44 : host_id_(host_id), |
| 45 msg_(msg) { | 45 msg_(msg) { |
| 46 } | 46 } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 void Run() { | 49 void Run() { |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 params.render_view_id); | 360 params.render_view_id); |
| 361 if (!host) | 361 if (!host) |
| 362 return; | 362 return; |
| 363 RenderWidgetHostView* view = host->view(); | 363 RenderWidgetHostView* view = host->view(); |
| 364 if (!view) | 364 if (!view) |
| 365 return; | 365 return; |
| 366 view->AcceleratedSurfaceRelease(params.identifier); | 366 view->AcceleratedSurfaceRelease(params.identifier); |
| 367 } | 367 } |
| 368 | 368 |
| 369 #endif | 369 #endif |
| OLD | NEW |