OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/compositor/delegated_frame_host.h" | 5 #include "content/browser/compositor/delegated_frame_host.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 #include "cc/output/compositor_frame_ack.h" | 10 #include "cc/output/compositor_frame_ack.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 frame_size_in_dip); | 394 frame_size_in_dip); |
395 } else { | 395 } else { |
396 frame_provider_->SetFrameData(frame_data.Pass()); | 396 frame_provider_->SetFrameData(frame_data.Pass()); |
397 } | 397 } |
398 } | 398 } |
399 } | 399 } |
400 released_front_lock_ = NULL; | 400 released_front_lock_ = NULL; |
401 current_frame_size_in_dip_ = frame_size_in_dip; | 401 current_frame_size_in_dip_ = frame_size_in_dip; |
402 CheckResizeLock(); | 402 CheckResizeLock(); |
403 | 403 |
404 client_->SchedulePaintInRect(damage_rect_in_dip); | 404 client_->GetLayer()->OnDelegatedFrameDamage(damage_rect_in_dip); |
405 | 405 |
406 pending_delegated_ack_count_++; | 406 pending_delegated_ack_count_++; |
407 | 407 |
408 ui::Compositor* compositor = client_->GetCompositor(); | 408 ui::Compositor* compositor = client_->GetCompositor(); |
409 if (!compositor) { | 409 if (!compositor) { |
410 SendDelegatedFrameAck(output_surface_id); | 410 SendDelegatedFrameAck(output_surface_id); |
411 } else { | 411 } else { |
412 std::vector<ui::LatencyInfo>::const_iterator it; | 412 std::vector<ui::LatencyInfo>::const_iterator it; |
413 for (it = latency_info.begin(); it != latency_info.end(); ++it) | 413 for (it = latency_info.begin(); it != latency_info.end(); ++it) |
414 compositor->SetLatencyInfo(*it); | 414 compositor->SetLatencyInfo(*it); |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 if (frame_provider_.get()) { | 916 if (frame_provider_.get()) { |
917 new_layer->SetShowDelegatedContent(frame_provider_.get(), | 917 new_layer->SetShowDelegatedContent(frame_provider_.get(), |
918 current_frame_size_in_dip_); | 918 current_frame_size_in_dip_); |
919 } | 919 } |
920 if (!surface_id_.is_null()) { | 920 if (!surface_id_.is_null()) { |
921 new_layer->SetShowSurface(surface_id_, current_frame_size_in_dip_); | 921 new_layer->SetShowSurface(surface_id_, current_frame_size_in_dip_); |
922 } | 922 } |
923 } | 923 } |
924 | 924 |
925 } // namespace content | 925 } // namespace content |
OLD | NEW |