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

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

Issue 110583008: Enable Canvas2D hardware acceleration for Android WebView Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 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 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 } 1828 }
1829 1829
1830 if (success) { 1830 if (success) {
1831 if (offscreen_context_provider.get() && 1831 if (offscreen_context_provider.get() &&
1832 !offscreen_context_provider->BindToCurrentThread()) 1832 !offscreen_context_provider->BindToCurrentThread())
1833 success = false; 1833 success = false;
1834 } 1834 }
1835 1835
1836 if (success) { 1836 if (success) {
1837 EnforceZeroBudget(false); 1837 EnforceZeroBudget(false);
1838 client_->OnGetRendererCapabilities();
1838 client_->SetNeedsCommitOnImplThread(); 1839 client_->SetNeedsCommitOnImplThread();
1839 } else { 1840 } else {
1840 if (offscreen_context_provider.get()) { 1841 if (offscreen_context_provider.get()) {
1841 if (offscreen_context_provider->BindToCurrentThread()) 1842 if (offscreen_context_provider->BindToCurrentThread())
1842 offscreen_context_provider->VerifyContexts(); 1843 offscreen_context_provider->VerifyContexts();
1843 offscreen_context_provider = NULL; 1844 offscreen_context_provider = NULL;
1844 } 1845 }
1845 1846
1846 client_->DidLoseOutputSurfaceOnImplThread(); 1847 client_->DidLoseOutputSurfaceOnImplThread();
1847 1848
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 DCHECK(renderer_); 1881 DCHECK(renderer_);
1881 1882
1882 EnforceZeroBudget(true); 1883 EnforceZeroBudget(true);
1883 CreateAndSetTileManager(resource_provider_.get(), 1884 CreateAndSetTileManager(resource_provider_.get(),
1884 NULL, 1885 NULL,
1885 GetRendererCapabilities().using_map_image); 1886 GetRendererCapabilities().using_map_image);
1886 DCHECK(tile_manager_); 1887 DCHECK(tile_manager_);
1887 1888
1888 SetOffscreenContextProvider(NULL); 1889 SetOffscreenContextProvider(NULL);
1889 1890
1891 client_->OnGetRendererCapabilities();
1890 client_->SetNeedsCommitOnImplThread(); 1892 client_->SetNeedsCommitOnImplThread();
1891 } 1893 }
1892 1894
1893 void LayerTreeHostImpl::SetViewportSize(gfx::Size device_viewport_size) { 1895 void LayerTreeHostImpl::SetViewportSize(gfx::Size device_viewport_size) {
1894 if (device_viewport_size == device_viewport_size_) 1896 if (device_viewport_size == device_viewport_size_)
1895 return; 1897 return;
1896 1898
1897 if (pending_tree_) 1899 if (pending_tree_)
1898 active_tree_->SetViewportSizeInvalid(); 1900 active_tree_->SetViewportSizeInvalid();
1899 1901
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2914 swap_promise_monitor_.erase(monitor); 2916 swap_promise_monitor_.erase(monitor);
2915 } 2917 }
2916 2918
2917 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 2919 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
2918 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 2920 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
2919 for (; it != swap_promise_monitor_.end(); it++) 2921 for (; it != swap_promise_monitor_.end(); it++)
2920 (*it)->OnSetNeedsRedrawOnImpl(); 2922 (*it)->OnSetNeedsRedrawOnImpl();
2921 } 2923 }
2922 2924
2923 } // namespace cc 2925 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698