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

Unified Diff: ash/wm/video_detector.cc

Issue 464643003: Stop painting when receiving delegated frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix crashes Created 6 years, 4 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
Index: ash/wm/video_detector.cc
diff --git a/ash/wm/video_detector.cc b/ash/wm/video_detector.cc
index f0a7aaac908db0fcf62bf3dd66ee1984f9e4a1b1..816a9c427a8e8ac4a015621919a17391787940bf 100644
--- a/ash/wm/video_detector.cc
+++ b/ash/wm/video_detector.cc
@@ -84,8 +84,9 @@ void VideoDetector::OnWindowInitialized(aura::Window* window) {
observer_manager_.Add(window);
}
-void VideoDetector::OnWindowPaintScheduled(aura::Window* window,
- const gfx::Rect& region) {
+void VideoDetector::OnDelegatedFrameDamage(
+ aura::Window* window,
+ const gfx::Rect& damage_rect_in_dip) {
if (is_shutting_down_)
return;
linked_ptr<WindowInfo>& info = window_infos_[window];
@@ -94,7 +95,7 @@ void VideoDetector::OnWindowPaintScheduled(aura::Window* window,
base::TimeTicks now =
!now_for_test_.is_null() ? now_for_test_ : base::TimeTicks::Now();
- if (info->RecordUpdateAndCheckForVideo(region, now))
+ if (info->RecordUpdateAndCheckForVideo(damage_rect_in_dip, now))
MaybeNotifyObservers(window, now);
}

Powered by Google App Engine
This is Rietveld 408576698