| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 modified_layers = true; | 403 modified_layers = true; |
| 404 } | 404 } |
| 405 } | 405 } |
| 406 released_front_lock_ = NULL; | 406 released_front_lock_ = NULL; |
| 407 current_frame_size_in_dip_ = frame_size_in_dip; | 407 current_frame_size_in_dip_ = frame_size_in_dip; |
| 408 CheckResizeLock(); | 408 CheckResizeLock(); |
| 409 | 409 |
| 410 if (modified_layers) { | 410 if (modified_layers) { |
| 411 // TODO(jbauman): Need to always tell the window observer about the | 411 // TODO(jbauman): Need to always tell the window observer about the |
| 412 // damage. | 412 // damage. |
| 413 client_->SchedulePaintInRect(damage_rect_in_dip); | 413 client_->GetLayer()->OnDelegatedFrameDamage(damage_rect_in_dip); |
| 414 } | 414 } |
| 415 | 415 |
| 416 pending_delegated_ack_count_++; | 416 pending_delegated_ack_count_++; |
| 417 | 417 |
| 418 ui::Compositor* compositor = client_->GetCompositor(); | 418 ui::Compositor* compositor = client_->GetCompositor(); |
| 419 if (!compositor || !modified_layers) { | 419 if (!compositor || !modified_layers) { |
| 420 SendDelegatedFrameAck(output_surface_id); | 420 SendDelegatedFrameAck(output_surface_id); |
| 421 } else { | 421 } else { |
| 422 std::vector<ui::LatencyInfo>::const_iterator it; | 422 std::vector<ui::LatencyInfo>::const_iterator it; |
| 423 for (it = latency_info.begin(); it != latency_info.end(); ++it) | 423 for (it = latency_info.begin(); it != latency_info.end(); ++it) |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 if (frame_provider_.get()) { | 926 if (frame_provider_.get()) { |
| 927 new_layer->SetShowDelegatedContent(frame_provider_.get(), | 927 new_layer->SetShowDelegatedContent(frame_provider_.get(), |
| 928 current_frame_size_in_dip_); | 928 current_frame_size_in_dip_); |
| 929 } | 929 } |
| 930 if (!surface_id_.is_null()) { | 930 if (!surface_id_.is_null()) { |
| 931 new_layer->SetShowSurface(surface_id_, current_frame_size_in_dip_); | 931 new_layer->SetShowSurface(surface_id_, current_frame_size_in_dip_); |
| 932 } | 932 } |
| 933 } | 933 } |
| 934 | 934 |
| 935 } // namespace content | 935 } // namespace content |
| OLD | NEW |