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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 151093005: cc: Update Main RendererCapabilities on DeferredInitialize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Release Mailbox if UsingSharedMemoryResources changed in TextureLayer::Update Created 6 years, 10 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 } 1868 }
1869 1869
1870 if (success) { 1870 if (success) {
1871 if (offscreen_context_provider.get() && 1871 if (offscreen_context_provider.get() &&
1872 !offscreen_context_provider->BindToCurrentThread()) 1872 !offscreen_context_provider->BindToCurrentThread())
1873 success = false; 1873 success = false;
1874 } 1874 }
1875 1875
1876 if (success) { 1876 if (success) {
1877 EnforceZeroBudget(false); 1877 EnforceZeroBudget(false);
1878 client_->UpdateRendererCapabilitiesOnImplThread();
enne (OOO) 2014/02/14 20:21:48 This seems like the wrong place to do this. Can y
boliu 2014/02/14 22:03:08 UpdateRendererCapabilitiesOnImplThread is only use
enne (OOO) 2014/02/14 22:08:49 Can there be only one?
boliu 2014/02/14 22:14:49 No...webview has the crazy requirement to synchron
enne (OOO) 2014/02/14 22:19:39 Sure, but the caps can still be sent back the same
boliu 2014/02/14 22:27:30 So InitializeRenderer has main thread blocked and
enne (OOO) 2014/02/14 23:02:27 Maybe it's just me, but I would rather have Create
1878 client_->SetNeedsCommitOnImplThread(); 1879 client_->SetNeedsCommitOnImplThread();
1879 } else { 1880 } else {
1880 if (offscreen_context_provider.get()) { 1881 if (offscreen_context_provider.get()) {
1881 if (offscreen_context_provider->BindToCurrentThread()) 1882 if (offscreen_context_provider->BindToCurrentThread())
1882 offscreen_context_provider->VerifyContexts(); 1883 offscreen_context_provider->VerifyContexts();
1883 offscreen_context_provider = NULL; 1884 offscreen_context_provider = NULL;
1884 } 1885 }
1885 1886
1886 client_->DidLoseOutputSurfaceOnImplThread(); 1887 client_->DidLoseOutputSurfaceOnImplThread();
1887 1888
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 1922
1922 EnforceZeroBudget(true); 1923 EnforceZeroBudget(true);
1923 CreateAndSetTileManager(resource_provider_.get(), 1924 CreateAndSetTileManager(resource_provider_.get(),
1924 NULL, 1925 NULL,
1925 GetRendererCapabilities().using_map_image, 1926 GetRendererCapabilities().using_map_image,
1926 GetRendererCapabilities().allow_rasterize_on_demand); 1927 GetRendererCapabilities().allow_rasterize_on_demand);
1927 DCHECK(tile_manager_); 1928 DCHECK(tile_manager_);
1928 1929
1929 SetOffscreenContextProvider(NULL); 1930 SetOffscreenContextProvider(NULL);
1930 1931
1932 client_->UpdateRendererCapabilitiesOnImplThread();
1931 client_->SetNeedsCommitOnImplThread(); 1933 client_->SetNeedsCommitOnImplThread();
1932 } 1934 }
1933 1935
1934 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { 1936 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) {
1935 if (device_viewport_size == device_viewport_size_) 1937 if (device_viewport_size == device_viewport_size_)
1936 return; 1938 return;
1937 1939
1938 if (pending_tree_) 1940 if (pending_tree_)
1939 active_tree_->SetViewportSizeInvalid(); 1941 active_tree_->SetViewportSizeInvalid();
1940 1942
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
2998 swap_promise_monitor_.erase(monitor); 3000 swap_promise_monitor_.erase(monitor);
2999 } 3001 }
3000 3002
3001 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 3003 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
3002 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3004 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3003 for (; it != swap_promise_monitor_.end(); it++) 3005 for (; it != swap_promise_monitor_.end(); it++)
3004 (*it)->OnSetNeedsRedrawOnImpl(); 3006 (*it)->OnSetNeedsRedrawOnImpl();
3005 } 3007 }
3006 3008
3007 } // namespace cc 3009 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698