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

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

Issue 913163004: Enable partial recording if slimmingPaintDisplayItemCache is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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
« no previous file with comments | « cc/resources/display_list_recording_source.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 21 matching lines...) Expand all
32 #include "content/common/content_switches_internal.h" 32 #include "content/common/content_switches_internal.h"
33 #include "content/common/gpu/client/context_provider_command_buffer.h" 33 #include "content/common/gpu/client/context_provider_command_buffer.h"
34 #include "content/public/common/content_switches.h" 34 #include "content/public/common/content_switches.h"
35 #include "content/renderer/input/input_handler_manager.h" 35 #include "content/renderer/input/input_handler_manager.h"
36 #include "content/renderer/scheduler/renderer_scheduler.h" 36 #include "content/renderer/scheduler/renderer_scheduler.h"
37 #include "gpu/command_buffer/client/gles2_interface.h" 37 #include "gpu/command_buffer/client/gles2_interface.h"
38 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac k.h" 38 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac k.h"
39 #include "third_party/WebKit/public/platform/WebSelectionBound.h" 39 #include "third_party/WebKit/public/platform/WebSelectionBound.h"
40 #include "third_party/WebKit/public/platform/WebSize.h" 40 #include "third_party/WebKit/public/platform/WebSize.h"
41 #include "third_party/WebKit/public/web/WebKit.h" 41 #include "third_party/WebKit/public/web/WebKit.h"
42 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
42 #include "third_party/WebKit/public/web/WebWidget.h" 43 #include "third_party/WebKit/public/web/WebWidget.h"
43 #include "ui/gfx/frame_time.h" 44 #include "ui/gfx/frame_time.h"
44 #include "ui/gfx/hud_font.h" 45 #include "ui/gfx/hud_font.h"
45 #include "ui/gl/gl_switches.h" 46 #include "ui/gl/gl_switches.h"
46 #include "ui/native_theme/native_theme_switches.h" 47 #include "ui/native_theme/native_theme_switches.h"
47 48
48 #if defined(OS_ANDROID) 49 #if defined(OS_ANDROID)
49 #include "content/renderer/android/synchronous_compositor_factory.h" 50 #include "content/renderer/android/synchronous_compositor_factory.h"
50 #include "ui/gfx/android/device_display_info.h" 51 #include "ui/gfx/android/device_display_info.h"
51 #endif 52 #endif
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 !cmd->HasSwitch(switches::kDisableGpuVsync); 189 !cmd->HasSwitch(switches::kDisableGpuVsync);
189 settings.use_external_begin_frame_source = 190 settings.use_external_begin_frame_source =
190 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); 191 cmd->HasSwitch(switches::kEnableBeginFrameScheduling);
191 settings.main_frame_before_activation_enabled = 192 settings.main_frame_before_activation_enabled =
192 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && 193 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) &&
193 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); 194 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation);
194 settings.report_overscroll_only_for_scrollable_axes = 195 settings.report_overscroll_only_for_scrollable_axes =
195 !compositor_deps_->IsElasticOverscrollEnabled(); 196 !compositor_deps_->IsElasticOverscrollEnabled();
196 settings.accelerated_animation_enabled = 197 settings.accelerated_animation_enabled =
197 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); 198 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation);
198 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); 199 if (cmd->HasSwitch(switches::kEnableSlimmingPaint)) {
200 settings.use_display_lists = true;
201 blink::WebRuntimeFeatures::enableSlimmingPaint(true);
Xianzhu 2015/02/12 22:33:49 This is needed because slimmingPaintDisplayItemCac
202 settings.record_full_layer =
203 !blink::WebRuntimeFeatures::slimmingPaintDisplayItemCacheEnabled();
204 }
199 205
200 settings.default_tile_size = CalculateDefaultTileSize(); 206 settings.default_tile_size = CalculateDefaultTileSize();
201 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { 207 if (cmd->HasSwitch(switches::kDefaultTileWidth)) {
202 int tile_width = 0; 208 int tile_width = 0;
203 GetSwitchValueAsInt(*cmd, 209 GetSwitchValueAsInt(*cmd,
204 switches::kDefaultTileWidth, 210 switches::kDefaultTileWidth,
205 1, 211 1,
206 std::numeric_limits<int>::max(), 212 std::numeric_limits<int>::max(),
207 &tile_width); 213 &tile_width);
208 settings.default_tile_size.set_width(tile_width); 214 settings.default_tile_size.set_width(tile_width);
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 widget_->OnSwapBuffersAborted(); 889 widget_->OnSwapBuffersAborted();
884 } 890 }
885 891
886 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 892 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
887 cc::ContextProvider* provider = 893 cc::ContextProvider* provider =
888 compositor_deps_->GetSharedMainThreadContextProvider(); 894 compositor_deps_->GetSharedMainThreadContextProvider();
889 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 895 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
890 } 896 }
891 897
892 } // namespace content 898 } // namespace content
OLDNEW
« no previous file with comments | « cc/resources/display_list_recording_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698