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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 } | 276 } |
277 #elif defined(OS_WIN) | 277 #elif defined(OS_WIN) |
278 // Ensure window does not have zero area because D3D cannot create a zero | 278 // Ensure window does not have zero area because D3D cannot create a zero |
279 // area swap chain. | 279 // area swap chain. |
280 SetWindowPos(surface.handle, | 280 SetWindowPos(surface.handle, |
281 NULL, | 281 NULL, |
282 0, 0, | 282 0, 0, |
283 std::max(1, size.width()), | 283 std::max(1, size.width()), |
284 std::max(1, size.height()), | 284 std::max(1, size.height()), |
285 SWP_NOSENDCHANGING | SWP_NOCOPYBITS | SWP_NOZORDER | | 285 SWP_NOSENDCHANGING | SWP_NOCOPYBITS | SWP_NOZORDER | |
286 SWP_NOACTIVATE | SWP_DEFERERASE); | 286 SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOMOVE); |
287 #endif | 287 #endif |
288 } | 288 } |
289 | 289 |
290 #endif | 290 #endif |
291 | 291 |
292 #if defined(USE_AURA) | 292 #if defined(USE_AURA) |
293 | 293 |
294 void GpuProcessHostUIShim::OnAcceleratedSurfaceNew( | 294 void GpuProcessHostUIShim::OnAcceleratedSurfaceNew( |
295 const GpuHostMsg_AcceleratedSurfaceNew_Params& params) { | 295 const GpuHostMsg_AcceleratedSurfaceNew_Params& params) { |
296 ScopedSendOnIOThread delayed_send( | 296 ScopedSendOnIOThread delayed_send( |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( | 388 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( |
389 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { | 389 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { |
390 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( | 390 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( |
391 params.surface_id); | 391 params.surface_id); |
392 if (!view) | 392 if (!view) |
393 return; | 393 return; |
394 view->AcceleratedSurfaceRelease(params.identifier); | 394 view->AcceleratedSurfaceRelease(params.identifier); |
395 } | 395 } |
396 | 396 |
397 #endif | 397 #endif |
OLD | NEW |