OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 max_untiled_layer_height); | 259 max_untiled_layer_height); |
260 | 260 |
261 settings.gpu_rasterization_msaa_sample_count = | 261 settings.gpu_rasterization_msaa_sample_count = |
262 compositor_deps_->GetGpuRasterizationMSAASampleCount(); | 262 compositor_deps_->GetGpuRasterizationMSAASampleCount(); |
263 settings.impl_side_painting = compositor_deps_->IsImplSidePaintingEnabled(); | 263 settings.impl_side_painting = compositor_deps_->IsImplSidePaintingEnabled(); |
264 settings.gpu_rasterization_forced = | 264 settings.gpu_rasterization_forced = |
265 compositor_deps_->IsGpuRasterizationForced(); | 265 compositor_deps_->IsGpuRasterizationForced(); |
266 settings.gpu_rasterization_enabled = | 266 settings.gpu_rasterization_enabled = |
267 compositor_deps_->IsGpuRasterizationEnabled(); | 267 compositor_deps_->IsGpuRasterizationEnabled(); |
268 | 268 |
269 if (compositor_deps_->IsThreadedGpuRasterizationEnabled()) { | |
270 settings.threaded_gpu_rasterization_enabled = true; | |
271 settings.gpu_rasterization_skewport_target_time_in_seconds = 0.2f; | |
272 } | |
273 | |
274 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled(); | 269 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled(); |
275 settings.use_distance_field_text = | 270 settings.use_distance_field_text = |
276 compositor_deps_->IsDistanceFieldTextEnabled(); | 271 compositor_deps_->IsDistanceFieldTextEnabled(); |
277 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled(); | 272 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled(); |
278 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled(); | 273 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled(); |
279 settings.enable_elastic_overscroll = | 274 settings.enable_elastic_overscroll = |
280 compositor_deps_->IsElasticOverscrollEnabled(); | 275 compositor_deps_->IsElasticOverscrollEnabled(); |
281 settings.use_image_texture_target = compositor_deps_->GetImageTextureTarget(); | 276 settings.use_image_texture_target = compositor_deps_->GetImageTextureTarget(); |
282 settings.gather_pixel_refs = compositor_deps_->IsGatherPixelRefsEnabled(); | 277 settings.gather_pixel_refs = compositor_deps_->IsGatherPixelRefsEnabled(); |
283 | 278 |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 cc::ContextProvider* provider = | 920 cc::ContextProvider* provider = |
926 compositor_deps_->GetSharedMainThreadContextProvider(); | 921 compositor_deps_->GetSharedMainThreadContextProvider(); |
927 // provider can be NULL after the GPU process crashed enough times and we | 922 // provider can be NULL after the GPU process crashed enough times and we |
928 // don't want to restart it any more (falling back to software). | 923 // don't want to restart it any more (falling back to software). |
929 if (!provider) | 924 if (!provider) |
930 return; | 925 return; |
931 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 926 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
932 } | 927 } |
933 | 928 |
934 } // namespace content | 929 } // namespace content |
OLD | NEW |