| 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 #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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 #if defined(TOOLKIT_USES_GTK) | 23 #if defined(TOOLKIT_USES_GTK) |
| 24 // These two #includes need to come after gpu_messages.h. | 24 // These two #includes need to come after gpu_messages.h. |
| 25 #include "ui/base/x/x11_util.h" | 25 #include "ui/base/x/x11_util.h" |
| 26 #include "ui/gfx/size.h" | 26 #include "ui/gfx/size.h" |
| 27 #include <gdk/gdk.h> // NOLINT | 27 #include <gdk/gdk.h> // NOLINT |
| 28 #include <gdk/gdkx.h> // NOLINT | 28 #include <gdk/gdkx.h> // NOLINT |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 using content::BrowserThread; | 31 using content::BrowserThread; |
| 32 using content::RenderWidgetHostImpl; |
| 32 using content::RenderWidgetHostViewPort; | 33 using content::RenderWidgetHostViewPort; |
| 33 | 34 |
| 34 namespace { | 35 namespace { |
| 35 | 36 |
| 36 // One of the linux specific headers defines this as a macro. | 37 // One of the linux specific headers defines this as a macro. |
| 37 #ifdef DestroyAll | 38 #ifdef DestroyAll |
| 38 #undef DestroyAll | 39 #undef DestroyAll |
| 39 #endif | 40 #endif |
| 40 | 41 |
| 41 base::LazyInstance<IDMap<GpuProcessHostUIShim> > g_hosts_by_id = | 42 base::LazyInstance<IDMap<GpuProcessHostUIShim> > g_hosts_by_id = |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( | 394 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( |
| 394 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { | 395 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { |
| 395 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( | 396 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( |
| 396 params.surface_id); | 397 params.surface_id); |
| 397 if (!view) | 398 if (!view) |
| 398 return; | 399 return; |
| 399 view->AcceleratedSurfaceRelease(params.identifier); | 400 view->AcceleratedSurfaceRelease(params.identifier); |
| 400 } | 401 } |
| 401 | 402 |
| 402 #endif | 403 #endif |
| OLD | NEW |