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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 frame_size_in_dip); | 396 frame_size_in_dip); |
397 } else { | 397 } else { |
398 frame_provider_->SetFrameData(frame_data.Pass()); | 398 frame_provider_->SetFrameData(frame_data.Pass()); |
399 } | 399 } |
400 } | 400 } |
401 } | 401 } |
402 released_front_lock_ = NULL; | 402 released_front_lock_ = NULL; |
403 current_frame_size_in_dip_ = frame_size_in_dip; | 403 current_frame_size_in_dip_ = frame_size_in_dip; |
404 CheckResizeLock(); | 404 CheckResizeLock(); |
405 | 405 |
406 client_->SchedulePaintInRect(damage_rect_in_dip); | 406 client_->NotifyDamage(damage_rect_in_dip); |
407 | 407 |
408 pending_delegated_ack_count_++; | 408 pending_delegated_ack_count_++; |
409 | 409 |
410 ui::Compositor* compositor = client_->GetCompositor(); | 410 ui::Compositor* compositor = client_->GetCompositor(); |
411 if (!compositor) { | 411 if (!compositor) { |
412 SendDelegatedFrameAck(output_surface_id); | 412 SendDelegatedFrameAck(output_surface_id); |
413 } else { | 413 } else { |
414 std::vector<ui::LatencyInfo>::const_iterator it; | 414 std::vector<ui::LatencyInfo>::const_iterator it; |
415 for (it = latency_info.begin(); it != latency_info.end(); ++it) | 415 for (it = latency_info.begin(); it != latency_info.end(); ++it) |
416 compositor->SetLatencyInfo(*it); | 416 compositor->SetLatencyInfo(*it); |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 if (frame_provider_.get()) { | 918 if (frame_provider_.get()) { |
919 new_layer->SetShowDelegatedContent(frame_provider_.get(), | 919 new_layer->SetShowDelegatedContent(frame_provider_.get(), |
920 current_frame_size_in_dip_); | 920 current_frame_size_in_dip_); |
921 } | 921 } |
922 if (!surface_id_.is_null()) { | 922 if (!surface_id_.is_null()) { |
923 new_layer->SetShowSurface(surface_id_, current_frame_size_in_dip_); | 923 new_layer->SetShowSurface(surface_id_, current_frame_size_in_dip_); |
924 } | 924 } |
925 } | 925 } |
926 | 926 |
927 } // namespace content | 927 } // namespace content |
OLD | NEW |