Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 699073004: content: Add command line flag for native GPU memory buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu-memory-buffer-impl-unittests
Patch Set: fix unit test failures on macosx Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 render_thread->is_impl_side_painting_enabled(); 228 render_thread->is_impl_side_painting_enabled();
229 settings.gpu_rasterization_forced = 229 settings.gpu_rasterization_forced =
230 render_thread->is_gpu_rasterization_forced(); 230 render_thread->is_gpu_rasterization_forced();
231 settings.gpu_rasterization_enabled = 231 settings.gpu_rasterization_enabled =
232 render_thread->is_gpu_rasterization_enabled(); 232 render_thread->is_gpu_rasterization_enabled();
233 settings.can_use_lcd_text = render_thread->is_lcd_text_enabled(); 233 settings.can_use_lcd_text = render_thread->is_lcd_text_enabled();
234 settings.use_distance_field_text = 234 settings.use_distance_field_text =
235 render_thread->is_distance_field_text_enabled(); 235 render_thread->is_distance_field_text_enabled();
236 settings.use_zero_copy = render_thread->is_zero_copy_enabled(); 236 settings.use_zero_copy = render_thread->is_zero_copy_enabled();
237 settings.use_one_copy = render_thread->is_one_copy_enabled(); 237 settings.use_one_copy = render_thread->is_one_copy_enabled();
238 settings.use_image_external = render_thread->use_image_external();
238 } 239 }
239 240
240 settings.calculate_top_controls_position = 241 settings.calculate_top_controls_position =
241 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); 242 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation);
242 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { 243 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) {
243 std::string controls_height_str = 244 std::string controls_height_str =
244 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); 245 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight);
245 double controls_height; 246 double controls_height;
246 if (base::StringToDouble(controls_height_str, &controls_height) && 247 if (base::StringToDouble(controls_height_str, &controls_height) &&
247 controls_height > 0) 248 controls_height > 0)
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 widget_->OnSwapBuffersAborted(); 904 widget_->OnSwapBuffersAborted();
904 } 905 }
905 906
906 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 907 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
907 cc::ContextProvider* provider = 908 cc::ContextProvider* provider =
908 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 909 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
909 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 910 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
910 } 911 }
911 912
912 } // namespace content 913 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698