Chromium Code Reviews| 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_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 642 : host_(RenderWidgetHostImpl::From(host)), | 642 : host_(RenderWidgetHostImpl::From(host)), |
| 643 window_(new aura::Window(this)), | 643 window_(new aura::Window(this)), |
| 644 in_shutdown_(false), | 644 in_shutdown_(false), |
| 645 is_fullscreen_(false), | 645 is_fullscreen_(false), |
| 646 popup_parent_host_view_(NULL), | 646 popup_parent_host_view_(NULL), |
| 647 popup_child_host_view_(NULL), | 647 popup_child_host_view_(NULL), |
| 648 is_loading_(false), | 648 is_loading_(false), |
| 649 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), | 649 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), |
| 650 can_compose_inline_(true), | 650 can_compose_inline_(true), |
| 651 has_composition_text_(false), | 651 has_composition_text_(false), |
| 652 last_output_surface_id_(0), | |
| 652 last_swapped_surface_scale_factor_(1.f), | 653 last_swapped_surface_scale_factor_(1.f), |
| 653 paint_canvas_(NULL), | 654 paint_canvas_(NULL), |
| 654 synthetic_move_sent_(false), | 655 synthetic_move_sent_(false), |
| 655 accelerated_compositing_state_changed_(false), | 656 accelerated_compositing_state_changed_(false), |
| 656 can_lock_compositor_(YES), | 657 can_lock_compositor_(YES), |
| 657 cursor_visibility_state_in_renderer_(UNKNOWN), | 658 cursor_visibility_state_in_renderer_(UNKNOWN), |
| 658 paint_observer_(NULL), | 659 paint_observer_(NULL), |
| 659 touch_editing_client_(NULL) { | 660 touch_editing_client_(NULL) { |
| 660 host_->SetView(this); | 661 host_->SetView(this); |
| 661 window_observer_.reset(new WindowObserver(this)); | 662 window_observer_.reset(new WindowObserver(this)); |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1452 framebuffer_holder_ = NULL; | 1453 framebuffer_holder_ = NULL; |
| 1453 if (ShouldSkipFrame(frame_size_in_dip)) { | 1454 if (ShouldSkipFrame(frame_size_in_dip)) { |
| 1454 cc::CompositorFrameAck ack; | 1455 cc::CompositorFrameAck ack; |
| 1455 cc::TransferableResource::ReturnResources(frame_data->resource_list, | 1456 cc::TransferableResource::ReturnResources(frame_data->resource_list, |
| 1456 &ack.resources); | 1457 &ack.resources); |
| 1457 RenderWidgetHostImpl::SendSwapCompositorFrameAck( | 1458 RenderWidgetHostImpl::SendSwapCompositorFrameAck( |
| 1458 host_->GetRoutingID(), output_surface_id, | 1459 host_->GetRoutingID(), output_surface_id, |
| 1459 host_->GetProcess()->GetID(), ack); | 1460 host_->GetProcess()->GetID(), ack); |
| 1460 return; | 1461 return; |
| 1461 } | 1462 } |
| 1463 if (output_surface_id != last_output_surface_id_) { | |
| 1464 // If the originating output surface doesn't match the last one, it | |
| 1465 // indicates the renderer's compositor may have been recreated, in which | |
|
danakj
2013/09/04 13:07:51
This mentions the compositor being recreated, but
piman
2013/09/04 21:45:02
Done.
| |
| 1466 // case we should recreate the DelegatedRendererLayer, to avoid matching | |
| 1467 // resources from the old one with resources from the new one which would | |
| 1468 // have the same id. | |
| 1469 window_->layer()->SetDelegatedFrame(scoped_ptr<cc::DelegatedFrameData>(), | |
| 1470 frame_size_in_dip); | |
| 1471 last_output_surface_id_ = output_surface_id; | |
| 1472 } | |
| 1462 window_->layer()->SetDelegatedFrame(frame_data.Pass(), frame_size_in_dip); | 1473 window_->layer()->SetDelegatedFrame(frame_data.Pass(), frame_size_in_dip); |
| 1463 released_front_lock_ = NULL; | 1474 released_front_lock_ = NULL; |
| 1464 current_frame_size_ = frame_size_in_dip; | 1475 current_frame_size_ = frame_size_in_dip; |
| 1465 CheckResizeLock(); | 1476 CheckResizeLock(); |
| 1466 | 1477 |
| 1467 if (paint_observer_) | 1478 if (paint_observer_) |
| 1468 paint_observer_->OnUpdateCompositorContent(); | 1479 paint_observer_->OnUpdateCompositorContent(); |
| 1469 | 1480 |
| 1470 ui::Compositor* compositor = GetCompositor(); | 1481 ui::Compositor* compositor = GetCompositor(); |
| 1471 if (!compositor) { | 1482 if (!compositor) { |
| (...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3259 RenderWidgetHost* widget) { | 3270 RenderWidgetHost* widget) { |
| 3260 return new RenderWidgetHostViewAura(widget); | 3271 return new RenderWidgetHostViewAura(widget); |
| 3261 } | 3272 } |
| 3262 | 3273 |
| 3263 // static | 3274 // static |
| 3264 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3275 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 3265 GetScreenInfoForWindow(results, NULL); | 3276 GetScreenInfoForWindow(results, NULL); |
| 3266 } | 3277 } |
| 3267 | 3278 |
| 3268 } // namespace content | 3279 } // namespace content |
| OLD | NEW |