| OLD | NEW |
| 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 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1837 } | 1837 } |
| 1838 | 1838 |
| 1839 if (success) { | 1839 if (success) { |
| 1840 if (offscreen_context_provider.get() && | 1840 if (offscreen_context_provider.get() && |
| 1841 !offscreen_context_provider->BindToCurrentThread()) | 1841 !offscreen_context_provider->BindToCurrentThread()) |
| 1842 success = false; | 1842 success = false; |
| 1843 } | 1843 } |
| 1844 | 1844 |
| 1845 if (success) { | 1845 if (success) { |
| 1846 EnforceZeroBudget(false); | 1846 EnforceZeroBudget(false); |
| 1847 client_->UpdateRendererCapabilitiesOnImplThread(); |
| 1847 client_->SetNeedsCommitOnImplThread(); | 1848 client_->SetNeedsCommitOnImplThread(); |
| 1848 } else { | 1849 } else { |
| 1849 if (offscreen_context_provider.get()) { | 1850 if (offscreen_context_provider.get()) { |
| 1850 if (offscreen_context_provider->BindToCurrentThread()) | 1851 if (offscreen_context_provider->BindToCurrentThread()) |
| 1851 offscreen_context_provider->VerifyContexts(); | 1852 offscreen_context_provider->VerifyContexts(); |
| 1852 offscreen_context_provider = NULL; | 1853 offscreen_context_provider = NULL; |
| 1853 } | 1854 } |
| 1854 | 1855 |
| 1855 client_->DidLoseOutputSurfaceOnImplThread(); | 1856 client_->DidLoseOutputSurfaceOnImplThread(); |
| 1856 | 1857 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1889 DCHECK(renderer_); | 1890 DCHECK(renderer_); |
| 1890 | 1891 |
| 1891 EnforceZeroBudget(true); | 1892 EnforceZeroBudget(true); |
| 1892 CreateAndSetTileManager(resource_provider_.get(), | 1893 CreateAndSetTileManager(resource_provider_.get(), |
| 1893 NULL, | 1894 NULL, |
| 1894 GetRendererCapabilities().using_map_image); | 1895 GetRendererCapabilities().using_map_image); |
| 1895 DCHECK(tile_manager_); | 1896 DCHECK(tile_manager_); |
| 1896 | 1897 |
| 1897 SetOffscreenContextProvider(NULL); | 1898 SetOffscreenContextProvider(NULL); |
| 1898 | 1899 |
| 1900 client_->UpdateRendererCapabilitiesOnImplThread(); |
| 1899 client_->SetNeedsCommitOnImplThread(); | 1901 client_->SetNeedsCommitOnImplThread(); |
| 1900 } | 1902 } |
| 1901 | 1903 |
| 1902 void LayerTreeHostImpl::SetViewportSize(gfx::Size device_viewport_size) { | 1904 void LayerTreeHostImpl::SetViewportSize(gfx::Size device_viewport_size) { |
| 1903 if (device_viewport_size == device_viewport_size_) | 1905 if (device_viewport_size == device_viewport_size_) |
| 1904 return; | 1906 return; |
| 1905 | 1907 |
| 1906 if (pending_tree_) | 1908 if (pending_tree_) |
| 1907 active_tree_->SetViewportSizeInvalid(); | 1909 active_tree_->SetViewportSizeInvalid(); |
| 1908 | 1910 |
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2921 swap_promise_monitor_.erase(monitor); | 2923 swap_promise_monitor_.erase(monitor); |
| 2922 } | 2924 } |
| 2923 | 2925 |
| 2924 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 2926 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
| 2925 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 2927 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
| 2926 for (; it != swap_promise_monitor_.end(); it++) | 2928 for (; it != swap_promise_monitor_.end(); it++) |
| 2927 (*it)->OnSetNeedsRedrawOnImpl(); | 2929 (*it)->OnSetNeedsRedrawOnImpl(); |
| 2928 } | 2930 } |
| 2929 | 2931 |
| 2930 } // namespace cc | 2932 } // namespace cc |
| OLD | NEW |