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

Unified Diff: content/browser/compositor/delegated_frame_host.cc

Issue 1131673009: Revert of Pass Surface ID namespace to renderer compositors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/compositor/delegated_frame_host.cc
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
index 0397b22bdea49c1da1f0babd5df6f3dace00c90d..f45e7f40c1c3028defaba8746b6d81954ee7bd0f 100644
--- a/content/browser/compositor/delegated_frame_host.cc
+++ b/content/browser/compositor/delegated_frame_host.cc
@@ -65,9 +65,7 @@
current_scale_factor_(1.f),
can_lock_compositor_(YES_CAN_LOCK),
delegated_frame_evictor_(new DelegatedFrameEvictor(this)) {
- ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
- factory->AddObserver(this);
- id_allocator_ = factory->GetContextFactory()->CreateSurfaceIdAllocator();
+ ImageTransportFactory::GetInstance()->AddObserver(this);
}
void DelegatedFrameHost::WasShown(const ui::LatencyInfo& latency_info) {
@@ -195,13 +193,6 @@
void DelegatedFrameHost::EndFrameSubscription() {
idle_frame_subscriber_textures_.clear();
frame_subscriber_.reset();
-}
-
-uint32_t DelegatedFrameHost::GetSurfaceIdNamespace() {
- if (!use_surfaces_)
- return 0;
-
- return id_allocator_->id_namespace();
}
bool DelegatedFrameHost::ShouldSkipFrame(gfx::Size size_in_dip) const {
@@ -374,6 +365,8 @@
ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
cc::SurfaceManager* manager = factory->GetSurfaceManager();
if (!surface_factory_) {
+ id_allocator_ =
+ factory->GetContextFactory()->CreateSurfaceIdAllocator();
surface_factory_ =
make_scoped_ptr(new cc::SurfaceFactory(manager, this));
}
« 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