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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 } | 270 } |
271 #elif defined(OS_WIN) | 271 #elif defined(OS_WIN) |
272 // Ensure window does not have zero area because D3D cannot create a zero | 272 // Ensure window does not have zero area because D3D cannot create a zero |
273 // area swap chain. | 273 // area swap chain. |
274 SetWindowPos(surface.handle, | 274 SetWindowPos(surface.handle, |
275 NULL, | 275 NULL, |
276 0, 0, | 276 0, 0, |
277 std::max(1, size.width()), | 277 std::max(1, size.width()), |
278 std::max(1, size.height()), | 278 std::max(1, size.height()), |
279 SWP_NOSENDCHANGING | SWP_NOCOPYBITS | SWP_NOZORDER | | 279 SWP_NOSENDCHANGING | SWP_NOCOPYBITS | SWP_NOZORDER | |
280 SWP_NOACTIVATE | SWP_DEFERERASE); | 280 SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOMOVE); |
281 #endif | 281 #endif |
282 } | 282 } |
283 | 283 |
284 #endif | 284 #endif |
285 | 285 |
286 void GpuProcessHostUIShim::OnAcceleratedSurfaceNew( | 286 void GpuProcessHostUIShim::OnAcceleratedSurfaceNew( |
287 const GpuHostMsg_AcceleratedSurfaceNew_Params& params) { | 287 const GpuHostMsg_AcceleratedSurfaceNew_Params& params) { |
288 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( | 288 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( |
289 params.surface_id); | 289 params.surface_id); |
290 if (!view) | 290 if (!view) |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 } | 360 } |
361 | 361 |
362 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( | 362 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( |
363 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { | 363 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { |
364 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( | 364 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( |
365 params.surface_id); | 365 params.surface_id); |
366 if (!view) | 366 if (!view) |
367 return; | 367 return; |
368 view->AcceleratedSurfaceRelease(params.identifier); | 368 view->AcceleratedSurfaceRelease(params.identifier); |
369 } | 369 } |
OLD | NEW |