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

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

Issue 1304063014: cc: Plumbing for BeginFrameSource based on Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix webview Created 5 years, 2 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/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 "base/time/default_tick_clock.h" 9 #include "base/time/default_tick_clock.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 SendReturnedDelegatedResources(last_output_surface_id_); 550 SendReturnedDelegatedResources(last_output_surface_id_);
551 } 551 }
552 552
553 void DelegatedFrameHost::WillDrawSurface(cc::SurfaceId id, 553 void DelegatedFrameHost::WillDrawSurface(cc::SurfaceId id,
554 const gfx::Rect& damage_rect) { 554 const gfx::Rect& damage_rect) {
555 if (id != surface_id_) 555 if (id != surface_id_)
556 return; 556 return;
557 AttemptFrameSubscriberCapture(damage_rect); 557 AttemptFrameSubscriberCapture(damage_rect);
558 } 558 }
559 559
560 void DelegatedFrameHost::SetBeginFrameSource(
561 cc::SurfaceId surface_id,
562 cc::BeginFrameSource* begin_frame_source) {
563 // TODO(tansell): Hook this up.
564 NOTIMPLEMENTED();
565 }
566
560 void DelegatedFrameHost::EvictDelegatedFrame() { 567 void DelegatedFrameHost::EvictDelegatedFrame() {
561 client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent(); 568 client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent();
562 frame_provider_ = NULL; 569 frame_provider_ = NULL;
563 if (!surface_id_.is_null()) { 570 if (!surface_id_.is_null()) {
564 surface_factory_->Destroy(surface_id_); 571 surface_factory_->Destroy(surface_id_);
565 surface_id_ = cc::SurfaceId(); 572 surface_id_ = cc::SurfaceId();
566 } 573 }
567 delegated_frame_evictor_->DiscardedFrame(); 574 delegated_frame_evictor_->DiscardedFrame();
568 } 575 }
569 576
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 cc::SurfaceManager* manager = factory->GetSurfaceManager(); 1066 cc::SurfaceManager* manager = factory->GetSurfaceManager();
1060 new_layer->SetShowSurface( 1067 new_layer->SetShowSurface(
1061 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), 1068 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)),
1062 base::Bind(&RequireCallback, base::Unretained(manager)), 1069 base::Bind(&RequireCallback, base::Unretained(manager)),
1063 current_surface_size_, current_scale_factor_, 1070 current_surface_size_, current_scale_factor_,
1064 current_frame_size_in_dip_); 1071 current_frame_size_in_dip_);
1065 } 1072 }
1066 } 1073 }
1067 1074
1068 } // namespace content 1075 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/delegated_frame_host.h ('k') | content/browser/frame_host/render_widget_host_view_child_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698