Commit 8244b9d3 authored by wangxianzhu's avatar wangxianzhu Committed by Commit bot

Enable partial recording if slimmingPaintDisplayItemCache is enabled

BUG=444163
R=enne@chromium.org
TBR=kbr@chromium.org (trivial change in render_widget_compositor.cc which is really related to cc/)

Review URL: https://codereview.chromium.org/913163004

Cr-Commit-Position: refs/heads/master@{#316244}
parent 2d72bc0e
......@@ -60,10 +60,9 @@ bool DisplayListRecordingSource::UpdateAndExpandInvalidation(
}
gfx::Rect old_recorded_viewport = recorded_viewport_;
// TODO(wangxianzhu): Blink slimming paint doesn't support incremental
// painting for now so we must record for the whole layer. Should measure
// performance and determine the best choice. Consider display item caching.
recorded_viewport_ = gfx::Rect(GetSize());
recorded_viewport_ = visible_layer_rect;
recorded_viewport_.Inset(-pixel_record_distance_, -pixel_record_distance_);
recorded_viewport_.Intersect(gfx::Rect(GetSize()));
if (recorded_viewport_ != old_recorded_viewport) {
// Invalidate newly-exposed and no-longer-exposed areas.
......
......@@ -39,6 +39,7 @@
#include "third_party/WebKit/public/platform/WebSelectionBound.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
#include "third_party/WebKit/public/web/WebWidget.h"
#include "ui/gfx/frame_time.h"
#include "ui/gfx/hud_font.h"
......@@ -195,7 +196,12 @@ void RenderWidgetCompositor::Initialize() {
!compositor_deps_->IsElasticOverscrollEnabled();
settings.accelerated_animation_enabled =
!cmd->HasSwitch(cc::switches::kDisableThreadedAnimation);
settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint);
if (cmd->HasSwitch(switches::kEnableSlimmingPaint)) {
settings.use_display_lists = true;
blink::WebRuntimeFeatures::enableSlimmingPaint(true);
settings.record_full_layer =
!blink::WebRuntimeFeatures::slimmingPaintDisplayItemCacheEnabled();
}
settings.default_tile_size = CalculateDefaultTileSize();
if (cmd->HasSwitch(switches::kDefaultTileWidth)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment