| 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 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1858 } | 1858 } |
| 1859 | 1859 |
| 1860 if (success) { | 1860 if (success) { |
| 1861 if (offscreen_context_provider.get() && | 1861 if (offscreen_context_provider.get() && |
| 1862 !offscreen_context_provider->BindToCurrentThread()) | 1862 !offscreen_context_provider->BindToCurrentThread()) |
| 1863 success = false; | 1863 success = false; |
| 1864 } | 1864 } |
| 1865 | 1865 |
| 1866 if (success) { | 1866 if (success) { |
| 1867 EnforceZeroBudget(false); | 1867 EnforceZeroBudget(false); |
| 1868 client_->UpdateRendererCapabilitiesOnImplThread(); |
| 1868 client_->SetNeedsCommitOnImplThread(); | 1869 client_->SetNeedsCommitOnImplThread(); |
| 1869 } else { | 1870 } else { |
| 1870 if (offscreen_context_provider.get()) { | 1871 if (offscreen_context_provider.get()) { |
| 1871 if (offscreen_context_provider->BindToCurrentThread()) | 1872 if (offscreen_context_provider->BindToCurrentThread()) |
| 1872 offscreen_context_provider->VerifyContexts(); | 1873 offscreen_context_provider->VerifyContexts(); |
| 1873 offscreen_context_provider = NULL; | 1874 offscreen_context_provider = NULL; |
| 1874 } | 1875 } |
| 1875 | 1876 |
| 1876 client_->DidLoseOutputSurfaceOnImplThread(); | 1877 client_->DidLoseOutputSurfaceOnImplThread(); |
| 1877 | 1878 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1910 DCHECK(renderer_); | 1911 DCHECK(renderer_); |
| 1911 | 1912 |
| 1912 EnforceZeroBudget(true); | 1913 EnforceZeroBudget(true); |
| 1913 CreateAndSetTileManager(resource_provider_.get(), | 1914 CreateAndSetTileManager(resource_provider_.get(), |
| 1914 NULL, | 1915 NULL, |
| 1915 GetRendererCapabilities().using_map_image); | 1916 GetRendererCapabilities().using_map_image); |
| 1916 DCHECK(tile_manager_); | 1917 DCHECK(tile_manager_); |
| 1917 | 1918 |
| 1918 SetOffscreenContextProvider(NULL); | 1919 SetOffscreenContextProvider(NULL); |
| 1919 | 1920 |
| 1921 client_->UpdateRendererCapabilitiesOnImplThread(); |
| 1920 client_->SetNeedsCommitOnImplThread(); | 1922 client_->SetNeedsCommitOnImplThread(); |
| 1921 } | 1923 } |
| 1922 | 1924 |
| 1923 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { | 1925 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { |
| 1924 if (device_viewport_size == device_viewport_size_) | 1926 if (device_viewport_size == device_viewport_size_) |
| 1925 return; | 1927 return; |
| 1926 | 1928 |
| 1927 if (pending_tree_) | 1929 if (pending_tree_) |
| 1928 active_tree_->SetViewportSizeInvalid(); | 1930 active_tree_->SetViewportSizeInvalid(); |
| 1929 | 1931 |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2987 swap_promise_monitor_.erase(monitor); | 2989 swap_promise_monitor_.erase(monitor); |
| 2988 } | 2990 } |
| 2989 | 2991 |
| 2990 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 2992 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
| 2991 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 2993 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
| 2992 for (; it != swap_promise_monitor_.end(); it++) | 2994 for (; it != swap_promise_monitor_.end(); it++) |
| 2993 (*it)->OnSetNeedsRedrawOnImpl(); | 2995 (*it)->OnSetNeedsRedrawOnImpl(); |
| 2994 } | 2996 } |
| 2995 | 2997 |
| 2996 } // namespace cc | 2998 } // namespace cc |
| OLD | NEW |