Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 9620019: Merge 125303 - Drop accelerated surface when switching off accelerated compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_win.h" 5 #include "content/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <peninputpanel_i.c> 8 #include <peninputpanel_i.c>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 2101 matching lines...) Expand 10 before | Expand all | Expand 10 after
2112 for (size_t i = 0; i < plugin_windows.size(); ++i) { 2112 for (size_t i = 0; i < plugin_windows.size(); ++i) {
2113 HWND next; 2113 HWND next;
2114 if (i + 1 < plugin_windows.size()) 2114 if (i + 1 < plugin_windows.size())
2115 next = plugin_windows[i+1]; 2115 next = plugin_windows[i+1];
2116 else 2116 else
2117 next = compositor_host_window_; 2117 next = compositor_host_window_;
2118 ::SetWindowPos(plugin_windows[i], next, 0, 0, 0, 0, 2118 ::SetWindowPos(plugin_windows[i], next, 0, 0, 0, 0,
2119 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); 2119 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
2120 } 2120 }
2121 } else { 2121 } else {
2122 // Drop the backing store for the accelerated surface when the accelerated
2123 // compositor is disabled. Otherwise, a flash of the last presented frame
2124 // could appear when it is next enabled.
2125 if (accelerated_surface_.get())
2126 accelerated_surface_->Suspend();
2122 hide_compositor_window_at_next_paint_ = true; 2127 hide_compositor_window_at_next_paint_ = true;
2123 } 2128 }
2124 } 2129 }
2125 2130
2126 void RenderWidgetHostViewWin::AcceleratedSurfaceBuffersSwapped( 2131 void RenderWidgetHostViewWin::AcceleratedSurfaceBuffersSwapped(
2127 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 2132 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
2128 int gpu_host_id) { 2133 int gpu_host_id) {
2129 if (params.surface_handle) { 2134 if (params.surface_handle) {
2130 if (!accelerated_surface_.get() && compositor_host_window_) { 2135 if (!accelerated_surface_.get() && compositor_host_window_) {
2131 accelerated_surface_.reset(new AcceleratedSurface); 2136 accelerated_surface_.reset(new AcceleratedSurface);
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2600 void RenderWidgetHostViewWin::ResetPointerDownContext() { 2605 void RenderWidgetHostViewWin::ResetPointerDownContext() {
2601 // If the default focus on the page is on an edit field and we did not 2606 // If the default focus on the page is on an edit field and we did not
2602 // receive a focus change in the context of a pointer down message, it means 2607 // receive a focus change in the context of a pointer down message, it means
2603 // that the pointer down message occurred on the edit field and we should 2608 // that the pointer down message occurred on the edit field and we should
2604 // display the on screen keyboard 2609 // display the on screen keyboard
2605 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) 2610 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_)
2606 DisplayOnScreenKeyboardIfNeeded(); 2611 DisplayOnScreenKeyboardIfNeeded();
2607 received_focus_change_after_pointer_down_ = false; 2612 received_focus_change_after_pointer_down_ = false;
2608 pointer_down_context_ = false; 2613 pointer_down_context_ = false;
2609 } 2614 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698