| 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 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 } | 1862 } |
| 1863 | 1863 |
| 1864 if (success) { | 1864 if (success) { |
| 1865 if (offscreen_context_provider.get() && | 1865 if (offscreen_context_provider.get() && |
| 1866 !offscreen_context_provider->BindToCurrentThread()) | 1866 !offscreen_context_provider->BindToCurrentThread()) |
| 1867 success = false; | 1867 success = false; |
| 1868 } | 1868 } |
| 1869 | 1869 |
| 1870 if (success) { | 1870 if (success) { |
| 1871 EnforceZeroBudget(false); | 1871 EnforceZeroBudget(false); |
| 1872 client_->UpdateRendererCapabilitiesOnImplThread(); |
| 1872 client_->SetNeedsCommitOnImplThread(); | 1873 client_->SetNeedsCommitOnImplThread(); |
| 1873 } else { | 1874 } else { |
| 1874 if (offscreen_context_provider.get()) { | 1875 if (offscreen_context_provider.get()) { |
| 1875 if (offscreen_context_provider->BindToCurrentThread()) | 1876 if (offscreen_context_provider->BindToCurrentThread()) |
| 1876 offscreen_context_provider->VerifyContexts(); | 1877 offscreen_context_provider->VerifyContexts(); |
| 1877 offscreen_context_provider = NULL; | 1878 offscreen_context_provider = NULL; |
| 1878 } | 1879 } |
| 1879 | 1880 |
| 1880 client_->DidLoseOutputSurfaceOnImplThread(); | 1881 client_->DidLoseOutputSurfaceOnImplThread(); |
| 1881 | 1882 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1915 | 1916 |
| 1916 EnforceZeroBudget(true); | 1917 EnforceZeroBudget(true); |
| 1917 CreateAndSetTileManager(resource_provider_.get(), | 1918 CreateAndSetTileManager(resource_provider_.get(), |
| 1918 NULL, | 1919 NULL, |
| 1919 GetRendererCapabilities().using_map_image, | 1920 GetRendererCapabilities().using_map_image, |
| 1920 GetRendererCapabilities().allow_rasterize_on_demand); | 1921 GetRendererCapabilities().allow_rasterize_on_demand); |
| 1921 DCHECK(tile_manager_); | 1922 DCHECK(tile_manager_); |
| 1922 | 1923 |
| 1923 SetOffscreenContextProvider(NULL); | 1924 SetOffscreenContextProvider(NULL); |
| 1924 | 1925 |
| 1926 client_->UpdateRendererCapabilitiesOnImplThread(); |
| 1925 client_->SetNeedsCommitOnImplThread(); | 1927 client_->SetNeedsCommitOnImplThread(); |
| 1926 } | 1928 } |
| 1927 | 1929 |
| 1928 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { | 1930 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { |
| 1929 if (device_viewport_size == device_viewport_size_) | 1931 if (device_viewport_size == device_viewport_size_) |
| 1930 return; | 1932 return; |
| 1931 | 1933 |
| 1932 if (pending_tree_) | 1934 if (pending_tree_) |
| 1933 active_tree_->SetViewportSizeInvalid(); | 1935 active_tree_->SetViewportSizeInvalid(); |
| 1934 | 1936 |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2992 swap_promise_monitor_.erase(monitor); | 2994 swap_promise_monitor_.erase(monitor); |
| 2993 } | 2995 } |
| 2994 | 2996 |
| 2995 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 2997 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
| 2996 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 2998 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
| 2997 for (; it != swap_promise_monitor_.end(); it++) | 2999 for (; it != swap_promise_monitor_.end(); it++) |
| 2998 (*it)->OnSetNeedsRedrawOnImpl(); | 3000 (*it)->OnSetNeedsRedrawOnImpl(); |
| 2999 } | 3001 } |
| 3000 | 3002 |
| 3001 } // namespace cc | 3003 } // namespace cc |
| OLD | NEW |