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

Unified Diff: ui/views/view.cc

Issue 1108463002: Revert of ui: Cache the output of View::OnPaint when the View isn't invalid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index c79cc6c85de1c23cf005a3ee7df3acba5471c23b..78659caf418cd1b5ee47d40b98e1841a3e4f659b 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -748,8 +748,7 @@
ui::PaintContext context =
parent_context.CloneWithPaintOffset(offset_to_parent);
- bool is_invalidated = true;
- if (context.CanCheckInvalid()) {
+ if (context.CanCheckInvalidated()) {
#if DCHECK_IS_ON()
gfx::Vector2d offset;
context.Visited(this);
@@ -771,11 +770,9 @@
// If the View wasn't invalidated, don't waste time painting it, the output
// would be culled.
- is_invalidated = context.IsRectInvalid(GetLocalBounds());
- }
-
- if (!is_invalidated && context.ShouldEarlyOutOfPaintingWhenValid())
- return;
+ if (!context.IsRectInvalidated(GetLocalBounds()))
+ return;
+ }
TRACE_EVENT1("views", "View::Paint", "class", GetClassName());
@@ -806,8 +803,8 @@
clip_transform_recorder->Transform(transform_from_parent);
}
- if (is_invalidated || !paint_cache_.UseCache(context)) {
- ui::PaintRecorder recorder(context, &paint_cache_);
+ {
+ ui::PaintRecorder recorder(context);
gfx::Canvas* canvas = recorder.canvas();
gfx::ScopedCanvas scoped_canvas(canvas);
« no previous file with comments | « ui/views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698