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

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

Issue 2890063002: Send BeginFrames for the renderer using Mojo (Closed)
Patch Set: c Created 3 years, 7 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
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/renderer_host/delegated_frame_host.h" 5 #include "content/browser/renderer_host/delegated_frame_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 507 }
508 508
509 void DelegatedFrameHost::WillDrawSurface(const cc::LocalSurfaceId& id, 509 void DelegatedFrameHost::WillDrawSurface(const cc::LocalSurfaceId& id,
510 const gfx::Rect& damage_rect) { 510 const gfx::Rect& damage_rect) {
511 if (id != local_surface_id_) 511 if (id != local_surface_id_)
512 return; 512 return;
513 AttemptFrameSubscriberCapture(damage_rect); 513 AttemptFrameSubscriberCapture(damage_rect);
514 } 514 }
515 515
516 void DelegatedFrameHost::OnBeginFrame(const cc::BeginFrameArgs& args) { 516 void DelegatedFrameHost::OnBeginFrame(const cc::BeginFrameArgs& args) {
517 client_->OnBeginFrame(args); 517 if (renderer_compositor_frame_sink_)
518 renderer_compositor_frame_sink_->OnBeginFrame(args);
519 client_->OnBeginFrame();
518 } 520 }
519 521
520 void DelegatedFrameHost::EvictDelegatedFrame() { 522 void DelegatedFrameHost::EvictDelegatedFrame() {
521 if (!has_frame_) 523 if (!has_frame_)
522 return; 524 return;
523 client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent(); 525 client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent();
524 support_->EvictCurrentSurface(); 526 support_->EvictCurrentSurface();
525 has_frame_ = false; 527 has_frame_ = false;
526 resize_lock_.reset(); 528 resize_lock_.reset();
527 frame_evictor_->DiscardedFrame(); 529 frame_evictor_->DiscardedFrame();
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 } 864 }
863 865
864 if (!skipped_frames_) { 866 if (!skipped_frames_) {
865 latest_confirmed_begin_frame_source_id_ = ack.source_id; 867 latest_confirmed_begin_frame_source_id_ = ack.source_id;
866 latest_confirmed_begin_frame_sequence_number_ = 868 latest_confirmed_begin_frame_sequence_number_ =
867 ack.latest_confirmed_sequence_number; 869 ack.latest_confirmed_sequence_number;
868 } 870 }
869 } 871 }
870 872
871 } // namespace content 873 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698