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

Unified Diff: cc/resources/picture_pile.cc

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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 | « cc/resources/picture_pile.h ('k') | cc/resources/recording_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile.cc
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index 2b15aeadb7c9ada7fee2003e0d0c465fd7a91785..04e08010073bfff27c10447f0bf5273ae9de2f47 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -214,6 +214,11 @@ bool PicturePile::UpdateAndExpandInvalidation(
return true;
}
+void PicturePile::DidMoveToNewCompositor() {
+ for (auto& map_pair : picture_map_)
+ map_pair.second.ResetInvalidationHistory();
+}
+
bool PicturePile::ApplyInvalidationAndResize(const gfx::Rect& interest_rect,
Region* invalidation,
const gfx::Size& layer_size,
@@ -747,6 +752,11 @@ bool PicturePile::PictureInfo::NeedsRecording(int frame_number,
(GetInvalidationFrequency() < kInvalidationFrequencyThreshold));
}
+void PicturePile::PictureInfo::ResetInvalidationHistory() {
+ invalidation_history_.reset();
+ last_frame_number_ = 0;
+}
+
void PicturePile::SetBufferPixels(int new_buffer_pixels) {
if (new_buffer_pixels == buffer_pixels())
return;
« no previous file with comments | « cc/resources/picture_pile.h ('k') | cc/resources/recording_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698