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

Side by Side Diff: sky/engine/core/rendering/ImageQualityController.cpp

Issue 791023006: Delete invalidateTreeIfNeeded. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 m_animatedResizeIsActive = false; 127 m_animatedResizeIsActive = false;
128 m_timer.stop(); 128 m_timer.stop();
129 } 129 }
130 } 130 }
131 131
132 void ImageQualityController::highQualityRepaintTimerFired(Timer<ImageQualityCont roller>*) 132 void ImageQualityController::highQualityRepaintTimerFired(Timer<ImageQualityCont roller>*)
133 { 133 {
134 if (!m_animatedResizeIsActive && !m_liveResizeOptimizationIsActive) 134 if (!m_animatedResizeIsActive && !m_liveResizeOptimizationIsActive)
135 return; 135 return;
136 m_animatedResizeIsActive = false; 136 m_animatedResizeIsActive = false;
137
138 for (ObjectLayerSizeMap::iterator it = m_objectLayerSizeMap.begin(); it != m _objectLayerSizeMap.end(); ++it) {
139 it->key->setShouldDoFullPaintInvalidation(true);
140 }
141
142 m_liveResizeOptimizationIsActive = false; 137 m_liveResizeOptimizationIsActive = false;
143 } 138 }
144 139
145 void ImageQualityController::restartTimer() 140 void ImageQualityController::restartTimer()
146 { 141 {
147 m_timer.startOneShot(cLowQualityTimeThreshold, FROM_HERE); 142 m_timer.startOneShot(cLowQualityTimeThreshold, FROM_HERE);
148 } 143 }
149 144
150 bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, R enderObject* object, Image* image, const void *layer, const LayoutSize& layoutSi ze) 145 bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, R enderObject* object, Image* image, const void *layer, const LayoutSize& layoutSi ze)
151 { 146 {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // This object has been resized to two different sizes while the timer 210 // This object has been resized to two different sizes while the timer
216 // is active, so draw at low quality, set the flag for animated resizes and 211 // is active, so draw at low quality, set the flag for animated resizes and
217 // the object to the list for high quality redraw. 212 // the object to the list for high quality redraw.
218 set(object, innerMap, layer, scaledLayoutSize); 213 set(object, innerMap, layer, scaledLayoutSize);
219 m_animatedResizeIsActive = true; 214 m_animatedResizeIsActive = true;
220 restartTimer(); 215 restartTimer();
221 return true; 216 return true;
222 } 217 }
223 218
224 } // namespace blink 219 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698