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

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: Even more compile fixes 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 } else { 400 } else {
401 frame_provider_->SetFrameData(frame_data.Pass()); 401 frame_provider_->SetFrameData(frame_data.Pass());
402 } 402 }
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 && !damage_rect_in_dip.IsEmpty()) {
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
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
OLDNEW
« no previous file with comments | « content/browser/compositor/delegated_frame_host.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698