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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2249 resource_provider_.get(), settings_.use_distance_field_text, | 2249 resource_provider_.get(), settings_.use_distance_field_text, |
2250 msaa_sample_count); | 2250 msaa_sample_count); |
2251 return; | 2251 return; |
2252 } | 2252 } |
2253 | 2253 |
2254 DCHECK(GetRendererCapabilities().using_image); | 2254 DCHECK(GetRendererCapabilities().using_image); |
2255 | 2255 |
2256 bool use_zero_copy = settings_.use_zero_copy; | 2256 bool use_zero_copy = settings_.use_zero_copy; |
2257 // TODO(reveman): Remove this when mojo supports worker contexts. | 2257 // TODO(reveman): Remove this when mojo supports worker contexts. |
2258 // crbug.com/522440 | 2258 // crbug.com/522440 |
2259 if (!worker_context_provider) { | 2259 if (!use_zero_copy && !worker_context_provider) { |
2260 LOG(ERROR) | 2260 LOG(ERROR) |
2261 << "Forcing zero-copy tile initialization as worker context is missing"; | 2261 << "Forcing zero-copy tile initialization as worker context is missing"; |
2262 use_zero_copy = true; | 2262 use_zero_copy = true; |
2263 } | 2263 } |
2264 | 2264 |
2265 if (use_zero_copy) { | 2265 if (use_zero_copy) { |
2266 *resource_pool = ResourcePool::CreateForGpuMemoryBufferResources( | 2266 *resource_pool = ResourcePool::CreateForGpuMemoryBufferResources( |
2267 resource_provider_.get(), GetTaskRunner()); | 2267 resource_provider_.get(), GetTaskRunner()); |
2268 | 2268 |
2269 *raster_buffer_provider = ZeroCopyRasterBufferProvider::Create( | 2269 *raster_buffer_provider = ZeroCopyRasterBufferProvider::Create( |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4029 const { | 4029 const { |
4030 return fixed_raster_scale_attempted_scale_change_history_.count() >= | 4030 return fixed_raster_scale_attempted_scale_change_history_.count() >= |
4031 kFixedRasterScaleAttemptedScaleChangeThreshold; | 4031 kFixedRasterScaleAttemptedScaleChangeThreshold; |
4032 } | 4032 } |
4033 | 4033 |
4034 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { | 4034 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { |
4035 fixed_raster_scale_attempted_scale_change_history_.set(0); | 4035 fixed_raster_scale_attempted_scale_change_history_.set(0); |
4036 } | 4036 } |
4037 | 4037 |
4038 } // namespace cc | 4038 } // namespace cc |
OLD | NEW |