| 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/renderer_host/render_widget_host_view_base.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/browser/accessibility/browser_accessibility_manager.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 9 #include "content/browser/gpu/gpu_data_manager_impl.h" | 9 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" | 10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 if (move.rects_valid) { | 285 if (move.rects_valid) { |
| 286 gfx::Rect clip_rect_in_pixel = gfx::win::DIPToScreenRect(move.clip_rect); | 286 gfx::Rect clip_rect_in_pixel = gfx::win::DIPToScreenRect(move.clip_rect); |
| 287 HRGN hrgn = ::CreateRectRgn(clip_rect_in_pixel.x(), | 287 HRGN hrgn = ::CreateRectRgn(clip_rect_in_pixel.x(), |
| 288 clip_rect_in_pixel.y(), | 288 clip_rect_in_pixel.y(), |
| 289 clip_rect_in_pixel.right(), | 289 clip_rect_in_pixel.right(), |
| 290 clip_rect_in_pixel.bottom()); | 290 clip_rect_in_pixel.bottom()); |
| 291 gfx::SubtractRectanglesFromRegion(hrgn, move.cutout_rects); | 291 gfx::SubtractRectanglesFromRegion(hrgn, move.cutout_rects); |
| 292 | 292 |
| 293 // Note: System will own the hrgn after we call SetWindowRgn, | 293 // Note: System will own the hrgn after we call SetWindowRgn, |
| 294 // so we don't need to call DeleteObject(hrgn) | 294 // so we don't need to call DeleteObject(hrgn) |
| 295 ::SetWindowRgn(window, hrgn, !move.clip_rect.IsEmpty()); | 295 ::SetWindowRgn(window, hrgn, |
| 296 !move.clip_rect.IsEmpty() && (flags & SWP_NOREDRAW) == 0); |
| 296 | 297 |
| 297 #if defined(USE_AURA) | 298 #if defined(USE_AURA) |
| 298 // When using the software compositor, if the clipping rectangle is empty | 299 // When using the software compositor, if the clipping rectangle is empty |
| 299 // then DeferWindowPos won't redraw the newly uncovered area under the | 300 // then DeferWindowPos won't redraw the newly uncovered area under the |
| 300 // plugin. | 301 // plugin. |
| 301 if (clip_rect_in_pixel.IsEmpty() && | 302 if (clip_rect_in_pixel.IsEmpty() && |
| 302 !GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) { | 303 !GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) { |
| 303 RECT r; | 304 RECT r; |
| 304 GetClientRect(window, &r); | 305 GetClientRect(window, &r); |
| 305 MapWindowPoints(window, parent, reinterpret_cast<POINT*>(&r), 2); | 306 MapWindowPoints(window, parent, reinterpret_cast<POINT*>(&r), 2); |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 void RenderWidgetHostViewBase::FlushInput() { | 587 void RenderWidgetHostViewBase::FlushInput() { |
| 587 RenderWidgetHostImpl* impl = NULL; | 588 RenderWidgetHostImpl* impl = NULL; |
| 588 if (GetRenderWidgetHost()) | 589 if (GetRenderWidgetHost()) |
| 589 impl = RenderWidgetHostImpl::From(GetRenderWidgetHost()); | 590 impl = RenderWidgetHostImpl::From(GetRenderWidgetHost()); |
| 590 if (!impl) | 591 if (!impl) |
| 591 return; | 592 return; |
| 592 impl->FlushInput(); | 593 impl->FlushInput(); |
| 593 } | 594 } |
| 594 | 595 |
| 595 } // namespace content | 596 } // namespace content |
| OLD | NEW |