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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 popup_type_(popup_type), | 219 popup_type_(popup_type), |
220 pending_window_rect_count_(0), | 220 pending_window_rect_count_(0), |
221 suppress_next_char_events_(false), | 221 suppress_next_char_events_(false), |
222 is_accelerated_compositing_active_(false), | 222 is_accelerated_compositing_active_(false), |
223 animation_update_pending_(false), | 223 animation_update_pending_(false), |
224 invalidation_task_posted_(false), | 224 invalidation_task_posted_(false), |
225 screen_info_(screen_info), | 225 screen_info_(screen_info), |
226 device_scale_factor_(screen_info_.deviceScaleFactor), | 226 device_scale_factor_(screen_info_.deviceScaleFactor), |
227 is_threaded_compositing_enabled_(false), | 227 is_threaded_compositing_enabled_(false), |
228 next_output_surface_id_(0), | 228 next_output_surface_id_(0), |
| 229 #if defined(OS_ANDROID) |
| 230 outstanding_ime_acks_(0), |
| 231 #endif |
229 weak_ptr_factory_(this) { | 232 weak_ptr_factory_(this) { |
230 if (!swapped_out) | 233 if (!swapped_out) |
231 RenderProcess::current()->AddRefProcess(); | 234 RenderProcess::current()->AddRefProcess(); |
232 DCHECK(RenderThread::Get()); | 235 DCHECK(RenderThread::Get()); |
233 has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch( | 236 has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch( |
234 switches::kDisableGpuVsync); | 237 switches::kDisableGpuVsync); |
235 is_threaded_compositing_enabled_ = | 238 is_threaded_compositing_enabled_ = |
236 CommandLine::ForCurrentProcess()->HasSwitch( | 239 CommandLine::ForCurrentProcess()->HasSwitch( |
237 switches::kEnableThreadedCompositing); | 240 switches::kEnableThreadedCompositing); |
238 | 241 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 IPC_MESSAGE_HANDLER(ViewMsg_ImeConfirmComposition, OnImeConfirmComposition) | 385 IPC_MESSAGE_HANDLER(ViewMsg_ImeConfirmComposition, OnImeConfirmComposition) |
383 IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnPaintAtSize) | 386 IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnPaintAtSize) |
384 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) | 387 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) |
385 IPC_MESSAGE_HANDLER(ViewMsg_SmoothScrollCompleted, OnSmoothScrollCompleted) | 388 IPC_MESSAGE_HANDLER(ViewMsg_SmoothScrollCompleted, OnSmoothScrollCompleted) |
386 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) | 389 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) |
387 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) | 390 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) |
388 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) | 391 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) |
389 #if defined(OS_ANDROID) | 392 #if defined(OS_ANDROID) |
390 IPC_MESSAGE_HANDLER(ViewMsg_ImeBatchStateChanged, OnImeBatchStateChanged) | 393 IPC_MESSAGE_HANDLER(ViewMsg_ImeBatchStateChanged, OnImeBatchStateChanged) |
391 IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded) | 394 IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded) |
| 395 IPC_MESSAGE_HANDLER(ViewMsg_ImeEventAck, OnImeEventAck) |
392 #endif | 396 #endif |
393 IPC_MESSAGE_HANDLER(ViewMsg_Snapshot, OnSnapshot) | 397 IPC_MESSAGE_HANDLER(ViewMsg_Snapshot, OnSnapshot) |
394 IPC_MESSAGE_HANDLER(ViewMsg_SetBrowserRenderingStats, | 398 IPC_MESSAGE_HANDLER(ViewMsg_SetBrowserRenderingStats, |
395 OnSetBrowserRenderingStats) | 399 OnSetBrowserRenderingStats) |
396 IPC_MESSAGE_UNHANDLED(handled = false) | 400 IPC_MESSAGE_UNHANDLED(handled = false) |
397 IPC_END_MESSAGE_MAP() | 401 IPC_END_MESSAGE_MAP() |
398 return handled; | 402 return handled; |
399 } | 403 } |
400 | 404 |
401 bool RenderWidget::Send(IPC::Message* message) { | 405 bool RenderWidget::Send(IPC::Message* message) { |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 if (compositor_) | 894 if (compositor_) |
891 compositor_->NotifyInputThrottledUntilCommit(); | 895 compositor_->NotifyInputThrottledUntilCommit(); |
892 } else { | 896 } else { |
893 Send(response); | 897 Send(response); |
894 } | 898 } |
895 | 899 |
896 #if defined(OS_ANDROID) | 900 #if defined(OS_ANDROID) |
897 // Allow the IME to be shown when the focus changes as a consequence | 901 // Allow the IME to be shown when the focus changes as a consequence |
898 // of a processed touch end event. | 902 // of a processed touch end event. |
899 if (input_event->type == WebInputEvent::TouchEnd && processed) | 903 if (input_event->type == WebInputEvent::TouchEnd && processed) |
900 UpdateTextInputState(SHOW_IME_IF_NEEDED); | 904 UpdateTextInputState(true, true); |
901 #endif | 905 #endif |
902 | 906 |
903 handling_input_event_ = false; | 907 handling_input_event_ = false; |
904 | 908 |
905 if (!prevent_default) { | 909 if (!prevent_default) { |
906 if (WebInputEvent::isKeyboardEventType(input_event->type)) | 910 if (WebInputEvent::isKeyboardEventType(input_event->type)) |
907 DidHandleKeyEvent(); | 911 DidHandleKeyEvent(); |
908 if (WebInputEvent::isMouseEventType(input_event->type)) | 912 if (WebInputEvent::isMouseEventType(input_event->type)) |
909 DidHandleMouseEvent(*(static_cast<const WebMouseEvent*>(input_event))); | 913 DidHandleMouseEvent(*(static_cast<const WebMouseEvent*>(input_event))); |
910 if (WebInputEvent::isTouchEventType(input_event->type)) | 914 if (WebInputEvent::isTouchEventType(input_event->type)) |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1580 void RenderWidget::willBeginCompositorFrame() { | 1584 void RenderWidget::willBeginCompositorFrame() { |
1581 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); | 1585 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); |
1582 | 1586 |
1583 DCHECK(RenderThreadImpl::current()->compositor_message_loop_proxy().get()); | 1587 DCHECK(RenderThreadImpl::current()->compositor_message_loop_proxy().get()); |
1584 | 1588 |
1585 // The following two can result in further layout and possibly | 1589 // The following two can result in further layout and possibly |
1586 // enable GPU acceleration so they need to be called before any painting | 1590 // enable GPU acceleration so they need to be called before any painting |
1587 // is done. | 1591 // is done. |
1588 UpdateTextInputType(); | 1592 UpdateTextInputType(); |
1589 #if defined(OS_ANDROID) | 1593 #if defined(OS_ANDROID) |
1590 UpdateTextInputState(DO_NOT_SHOW_IME); | 1594 UpdateTextInputState(false, true); |
1591 #endif | 1595 #endif |
1592 UpdateSelectionBounds(); | 1596 UpdateSelectionBounds(); |
1593 | 1597 |
1594 WillInitiatePaint(); | 1598 WillInitiatePaint(); |
1595 } | 1599 } |
1596 | 1600 |
1597 void RenderWidget::didBecomeReadyForAdditionalInput() { | 1601 void RenderWidget::didBecomeReadyForAdditionalInput() { |
1598 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); | 1602 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); |
1599 if (pending_input_event_ack_) | 1603 if (pending_input_event_ack_) |
1600 Send(pending_input_event_ack_.release()); | 1604 Send(pending_input_event_ack_.release()); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1805 // To prevent this renderer process from sending unnecessary IPC messages to | 1809 // To prevent this renderer process from sending unnecessary IPC messages to |
1806 // a browser process, we permit the renderer process to send IPC messages | 1810 // a browser process, we permit the renderer process to send IPC messages |
1807 // only during the input method attached to the browser process is active. | 1811 // only during the input method attached to the browser process is active. |
1808 input_method_is_active_ = is_active; | 1812 input_method_is_active_ = is_active; |
1809 } | 1813 } |
1810 | 1814 |
1811 void RenderWidget::OnImeSetComposition( | 1815 void RenderWidget::OnImeSetComposition( |
1812 const string16& text, | 1816 const string16& text, |
1813 const std::vector<WebCompositionUnderline>& underlines, | 1817 const std::vector<WebCompositionUnderline>& underlines, |
1814 int selection_start, int selection_end) { | 1818 int selection_start, int selection_end) { |
1815 if (!webwidget_) | 1819 if (!ShouldHandleImeEvent()) |
1816 return; | 1820 return; |
1817 ImeEventGuard guard(this); | 1821 ImeEventGuard guard(this); |
1818 if (!webwidget_->setComposition( | 1822 if (!webwidget_->setComposition( |
1819 text, WebVector<WebCompositionUnderline>(underlines), | 1823 text, WebVector<WebCompositionUnderline>(underlines), |
1820 selection_start, selection_end)) { | 1824 selection_start, selection_end)) { |
1821 // If we failed to set the composition text, then we need to let the browser | 1825 // If we failed to set the composition text, then we need to let the browser |
1822 // process to cancel the input method's ongoing composition session, to make | 1826 // process to cancel the input method's ongoing composition session, to make |
1823 // sure we are in a consistent state. | 1827 // sure we are in a consistent state. |
1824 Send(new ViewHostMsg_ImeCancelComposition(routing_id())); | 1828 Send(new ViewHostMsg_ImeCancelComposition(routing_id())); |
1825 } | 1829 } |
1826 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) | 1830 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) |
1827 UpdateCompositionInfo(true); | 1831 UpdateCompositionInfo(true); |
1828 #endif | 1832 #endif |
1829 } | 1833 } |
1830 | 1834 |
1831 void RenderWidget::OnImeConfirmComposition(const string16& text, | 1835 void RenderWidget::OnImeConfirmComposition(const string16& text, |
1832 const ui::Range& replacement_range, | 1836 const ui::Range& replacement_range, |
1833 bool keep_selection) { | 1837 bool keep_selection) { |
1834 if (!webwidget_) | 1838 if (!ShouldHandleImeEvent()) |
1835 return; | 1839 return; |
1836 ImeEventGuard guard(this); | 1840 ImeEventGuard guard(this); |
1837 handling_input_event_ = true; | 1841 handling_input_event_ = true; |
1838 if (text.length()) | 1842 if (text.length()) |
1839 webwidget_->confirmComposition(text); | 1843 webwidget_->confirmComposition(text); |
1840 else if (keep_selection) | 1844 else if (keep_selection) |
1841 webwidget_->confirmComposition(WebWidget::KeepSelection); | 1845 webwidget_->confirmComposition(WebWidget::KeepSelection); |
1842 else | 1846 else |
1843 webwidget_->confirmComposition(WebWidget::DoNotKeepSelection); | 1847 webwidget_->confirmComposition(WebWidget::DoNotKeepSelection); |
1844 handling_input_event_ = false; | 1848 handling_input_event_ = false; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2007 window_screen_rect_ = window_screen_rect; | 2011 window_screen_rect_ = window_screen_rect; |
2008 Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id())); | 2012 Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id())); |
2009 } | 2013 } |
2010 | 2014 |
2011 #if defined(OS_ANDROID) | 2015 #if defined(OS_ANDROID) |
2012 void RenderWidget::OnImeBatchStateChanged(bool is_begin) { | 2016 void RenderWidget::OnImeBatchStateChanged(bool is_begin) { |
2013 Send(new ViewHostMsg_ImeBatchStateChanged_ACK(routing_id(), is_begin)); | 2017 Send(new ViewHostMsg_ImeBatchStateChanged_ACK(routing_id(), is_begin)); |
2014 } | 2018 } |
2015 | 2019 |
2016 void RenderWidget::OnShowImeIfNeeded() { | 2020 void RenderWidget::OnShowImeIfNeeded() { |
2017 UpdateTextInputState(SHOW_IME_IF_NEEDED); | 2021 UpdateTextInputState(true, true); |
| 2022 } |
| 2023 |
| 2024 void RenderWidget::IncrementOutstandingImeEventAcks() { |
| 2025 ++outstanding_ime_acks_; |
| 2026 } |
| 2027 |
| 2028 void RenderWidget::OnImeEventAck() { |
| 2029 --outstanding_ime_acks_; |
| 2030 DCHECK(outstanding_ime_acks_ >= 0); |
2018 } | 2031 } |
2019 #endif | 2032 #endif |
2020 | 2033 |
| 2034 bool RenderWidget::ShouldHandleImeEvent() { |
| 2035 #if defined(OS_ANDROID) |
| 2036 return !!webwidget_ && outstanding_ime_acks_ == 0; |
| 2037 #else |
| 2038 return !!webwidget_; |
| 2039 #endif |
| 2040 } |
| 2041 |
2021 void RenderWidget::SetDeviceScaleFactor(float device_scale_factor) { | 2042 void RenderWidget::SetDeviceScaleFactor(float device_scale_factor) { |
2022 if (device_scale_factor_ == device_scale_factor) | 2043 if (device_scale_factor_ == device_scale_factor) |
2023 return; | 2044 return; |
2024 | 2045 |
2025 device_scale_factor_ = device_scale_factor; | 2046 device_scale_factor_ = device_scale_factor; |
2026 | 2047 |
2027 if (!is_accelerated_compositing_active_) { | 2048 if (!is_accelerated_compositing_active_) { |
2028 didInvalidateRect(gfx::Rect(size_.width(), size_.height())); | 2049 didInvalidateRect(gfx::Rect(size_.width(), size_.height())); |
2029 } else { | 2050 } else { |
2030 scheduleComposite(); | 2051 scheduleComposite(); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2123 } | 2144 } |
2124 | 2145 |
2125 void RenderWidget::FinishHandlingImeEvent() { | 2146 void RenderWidget::FinishHandlingImeEvent() { |
2126 DCHECK(handling_ime_event_); | 2147 DCHECK(handling_ime_event_); |
2127 handling_ime_event_ = false; | 2148 handling_ime_event_ = false; |
2128 // While handling an ime event, text input state and selection bounds updates | 2149 // While handling an ime event, text input state and selection bounds updates |
2129 // are ignored. These must explicitly be updated once finished handling the | 2150 // are ignored. These must explicitly be updated once finished handling the |
2130 // ime event. | 2151 // ime event. |
2131 UpdateSelectionBounds(); | 2152 UpdateSelectionBounds(); |
2132 #if defined(OS_ANDROID) | 2153 #if defined(OS_ANDROID) |
2133 UpdateTextInputState(DO_NOT_SHOW_IME); | 2154 UpdateTextInputState(false, false); |
2134 #endif | 2155 #endif |
2135 } | 2156 } |
2136 | 2157 |
2137 void RenderWidget::UpdateTextInputType() { | 2158 void RenderWidget::UpdateTextInputType() { |
2138 if (!input_method_is_active_) | 2159 if (!input_method_is_active_) |
2139 return; | 2160 return; |
2140 | 2161 |
2141 ui::TextInputType new_type = GetTextInputType(); | 2162 ui::TextInputType new_type = GetTextInputType(); |
2142 if (IsDateTimeInput(new_type)) | 2163 if (IsDateTimeInput(new_type)) |
2143 return; // Not considered as a text input field in WebKit/Chromium. | 2164 return; // Not considered as a text input field in WebKit/Chromium. |
(...skipping 12 matching lines...) Expand all Loading... |
2156 new_type, | 2177 new_type, |
2157 new_can_compose_inline, | 2178 new_can_compose_inline, |
2158 new_mode)); | 2179 new_mode)); |
2159 text_input_type_ = new_type; | 2180 text_input_type_ = new_type; |
2160 can_compose_inline_ = new_can_compose_inline; | 2181 can_compose_inline_ = new_can_compose_inline; |
2161 text_input_mode_ = new_mode; | 2182 text_input_mode_ = new_mode; |
2162 } | 2183 } |
2163 } | 2184 } |
2164 | 2185 |
2165 #if defined(OS_ANDROID) | 2186 #if defined(OS_ANDROID) |
2166 void RenderWidget::UpdateTextInputState(ShowIme show_ime) { | 2187 void RenderWidget::UpdateTextInputState(bool show_ime_if_needed, |
| 2188 bool send_ime_ack) { |
2167 if (handling_ime_event_) | 2189 if (handling_ime_event_) |
2168 return; | 2190 return; |
2169 bool show_ime_if_needed = (show_ime == SHOW_IME_IF_NEEDED); | |
2170 if (!show_ime_if_needed && !input_method_is_active_) | 2191 if (!show_ime_if_needed && !input_method_is_active_) |
2171 return; | 2192 return; |
2172 ui::TextInputType new_type = GetTextInputType(); | 2193 ui::TextInputType new_type = GetTextInputType(); |
2173 if (IsDateTimeInput(new_type)) | 2194 if (IsDateTimeInput(new_type)) |
2174 return; // Not considered as a text input field in WebKit/Chromium. | 2195 return; // Not considered as a text input field in WebKit/Chromium. |
2175 | 2196 |
2176 WebKit::WebTextInputInfo new_info; | 2197 WebKit::WebTextInputInfo new_info; |
2177 if (webwidget_) | 2198 if (webwidget_) |
2178 new_info = webwidget_->textInputInfo(); | 2199 new_info = webwidget_->textInputInfo(); |
2179 | 2200 |
2180 bool new_can_compose_inline = CanComposeInline(); | 2201 bool new_can_compose_inline = CanComposeInline(); |
2181 | 2202 |
2182 // Only sends text input params if they are changed or if the ime should be | 2203 // Only sends text input params if they are changed or if the ime should be |
2183 // shown. | 2204 // shown. |
2184 if (show_ime_if_needed || (text_input_type_ != new_type | 2205 if (show_ime_if_needed || (text_input_type_ != new_type |
2185 || text_input_info_ != new_info | 2206 || text_input_info_ != new_info |
2186 || can_compose_inline_ != new_can_compose_inline)) { | 2207 || can_compose_inline_ != new_can_compose_inline)) { |
2187 ViewHostMsg_TextInputState_Params p; | 2208 ViewHostMsg_TextInputState_Params p; |
2188 p.type = new_type; | 2209 p.type = new_type; |
2189 p.value = new_info.value.utf8(); | 2210 p.value = new_info.value.utf8(); |
2190 p.selection_start = new_info.selectionStart; | 2211 p.selection_start = new_info.selectionStart; |
2191 p.selection_end = new_info.selectionEnd; | 2212 p.selection_end = new_info.selectionEnd; |
2192 p.composition_start = new_info.compositionStart; | 2213 p.composition_start = new_info.compositionStart; |
2193 p.composition_end = new_info.compositionEnd; | 2214 p.composition_end = new_info.compositionEnd; |
2194 p.can_compose_inline = new_can_compose_inline; | 2215 p.can_compose_inline = new_can_compose_inline; |
2195 p.show_ime_if_needed = show_ime_if_needed; | 2216 p.show_ime_if_needed = show_ime_if_needed; |
| 2217 p.require_ack = send_ime_ack; |
| 2218 if (p.require_ack) |
| 2219 IncrementOutstandingImeEventAcks(); |
2196 Send(new ViewHostMsg_TextInputStateChanged(routing_id(), p)); | 2220 Send(new ViewHostMsg_TextInputStateChanged(routing_id(), p)); |
2197 | 2221 |
2198 text_input_info_ = new_info; | 2222 text_input_info_ = new_info; |
2199 text_input_type_ = new_type; | 2223 text_input_type_ = new_type; |
2200 can_compose_inline_ = new_can_compose_inline; | 2224 can_compose_inline_ = new_can_compose_inline; |
2201 } | 2225 } |
2202 } | 2226 } |
2203 #endif | 2227 #endif |
2204 | 2228 |
2205 void RenderWidget::GetSelectionBounds(gfx::Rect* focus, gfx::Rect* anchor) { | 2229 void RenderWidget::GetSelectionBounds(gfx::Rect* focus, gfx::Rect* anchor) { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2366 } | 2390 } |
2367 | 2391 |
2368 void RenderWidget::didHandleGestureEvent( | 2392 void RenderWidget::didHandleGestureEvent( |
2369 const WebGestureEvent& event, | 2393 const WebGestureEvent& event, |
2370 bool event_cancelled) { | 2394 bool event_cancelled) { |
2371 #if defined(OS_ANDROID) | 2395 #if defined(OS_ANDROID) |
2372 if (event_cancelled) | 2396 if (event_cancelled) |
2373 return; | 2397 return; |
2374 if (event.type == WebInputEvent::GestureTap || | 2398 if (event.type == WebInputEvent::GestureTap || |
2375 event.type == WebInputEvent::GestureLongPress) { | 2399 event.type == WebInputEvent::GestureLongPress) { |
2376 UpdateTextInputState(SHOW_IME_IF_NEEDED); | 2400 UpdateTextInputState(true, true); |
2377 } | 2401 } |
2378 #endif | 2402 #endif |
2379 } | 2403 } |
2380 | 2404 |
2381 void RenderWidget::SchedulePluginMove(const WebPluginGeometry& move) { | 2405 void RenderWidget::SchedulePluginMove(const WebPluginGeometry& move) { |
2382 size_t i = 0; | 2406 size_t i = 0; |
2383 for (; i < plugin_window_moves_.size(); ++i) { | 2407 for (; i < plugin_window_moves_.size(); ++i) { |
2384 if (plugin_window_moves_[i].window == move.window) { | 2408 if (plugin_window_moves_[i].window == move.window) { |
2385 if (move.rects_valid) { | 2409 if (move.rects_valid) { |
2386 plugin_window_moves_[i] = move; | 2410 plugin_window_moves_[i] = move; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2496 | 2520 |
2497 if (!context->InitializeWithDefaultBufferSizes( | 2521 if (!context->InitializeWithDefaultBufferSizes( |
2498 attributes, | 2522 attributes, |
2499 false /* bind generates resources */, | 2523 false /* bind generates resources */, |
2500 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) | 2524 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) |
2501 return NULL; | 2525 return NULL; |
2502 return context.release(); | 2526 return context.release(); |
2503 } | 2527 } |
2504 | 2528 |
2505 } // namespace content | 2529 } // namespace content |
OLD | NEW |