Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: content/browser/compositor/delegated_frame_host.cc

Issue 464643003: Stop painting when receiving delegated frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698