| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 332 |
| 333 settings.can_use_lcd_text = compositor_deps->IsLcdTextEnabled(); | 333 settings.can_use_lcd_text = compositor_deps->IsLcdTextEnabled(); |
| 334 settings.use_distance_field_text = | 334 settings.use_distance_field_text = |
| 335 compositor_deps->IsDistanceFieldTextEnabled(); | 335 compositor_deps->IsDistanceFieldTextEnabled(); |
| 336 settings.use_zero_copy = compositor_deps->IsZeroCopyEnabled(); | 336 settings.use_zero_copy = compositor_deps->IsZeroCopyEnabled(); |
| 337 settings.use_partial_raster = compositor_deps->IsPartialRasterEnabled(); | 337 settings.use_partial_raster = compositor_deps->IsPartialRasterEnabled(); |
| 338 settings.enable_elastic_overscroll = | 338 settings.enable_elastic_overscroll = |
| 339 compositor_deps->IsElasticOverscrollEnabled(); | 339 compositor_deps->IsElasticOverscrollEnabled(); |
| 340 settings.renderer_settings.use_gpu_memory_buffer_resources = | 340 settings.renderer_settings.use_gpu_memory_buffer_resources = |
| 341 compositor_deps->IsGpuMemoryBufferCompositorResourcesEnabled(); | 341 compositor_deps->IsGpuMemoryBufferCompositorResourcesEnabled(); |
| 342 settings.use_image_texture_targets = | 342 settings.renderer_settings.buffer_to_texture_target_map = |
| 343 compositor_deps->GetImageTextureTargets(); | 343 compositor_deps->GetBufferToTextureTargetMap(); |
| 344 settings.image_decode_tasks_enabled = | 344 settings.image_decode_tasks_enabled = |
| 345 compositor_deps->AreImageDecodeTasksEnabled(); | 345 compositor_deps->AreImageDecodeTasksEnabled(); |
| 346 | 346 |
| 347 if (cmd.HasSwitch(cc::switches::kTopControlsShowThreshold)) { | 347 if (cmd.HasSwitch(cc::switches::kTopControlsShowThreshold)) { |
| 348 std::string top_threshold_str = | 348 std::string top_threshold_str = |
| 349 cmd.GetSwitchValueASCII(cc::switches::kTopControlsShowThreshold); | 349 cmd.GetSwitchValueASCII(cc::switches::kTopControlsShowThreshold); |
| 350 double show_threshold; | 350 double show_threshold; |
| 351 if (base::StringToDouble(top_threshold_str, &show_threshold) && | 351 if (base::StringToDouble(top_threshold_str, &show_threshold) && |
| 352 show_threshold >= 0.f && show_threshold <= 1.f) | 352 show_threshold >= 0.f && show_threshold <= 1.f) |
| 353 settings.top_controls_show_threshold = show_threshold; | 353 settings.top_controls_show_threshold = show_threshold; |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 | 1144 |
| 1145 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); | 1145 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1148 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
| 1149 float device_scale) { | 1149 float device_scale) { |
| 1150 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); | 1150 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
| 1151 } | 1151 } |
| 1152 | 1152 |
| 1153 } // namespace content | 1153 } // namespace content |
| OLD | NEW |