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

Side by Side Diff: Source/core/rendering/ImageQualityController.cpp

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/core/rendering/RenderMarquee.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 } 118 }
119 it->key->repaint(); 119 it->key->repaint();
120 } 120 }
121 121
122 m_liveResizeOptimizationIsActive = false; 122 m_liveResizeOptimizationIsActive = false;
123 } 123 }
124 124
125 void ImageQualityController::restartTimer() 125 void ImageQualityController::restartTimer()
126 { 126 {
127 m_timer.startOneShot(cLowQualityTimeThreshold); 127 m_timer.startOneShot(cLowQualityTimeThreshold, FROM_HERE);
128 } 128 }
129 129
130 bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, R enderObject* object, Image* image, const void *layer, const LayoutSize& layoutSi ze) 130 bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, R enderObject* object, Image* image, const void *layer, const LayoutSize& layoutSi ze)
131 { 131 {
132 // If the image is not a bitmap image, then none of this is relevant and we just paint at high 132 // If the image is not a bitmap image, then none of this is relevant and we just paint at high
133 // quality. 133 // quality.
134 if (!image || !image->isBitmapImage() || context->paintingDisabled()) 134 if (!image || !image->isBitmapImage() || context->paintingDisabled())
135 return false; 135 return false;
136 136
137 if (object->style()->imageRendering() == ImageRenderingOptimizeContrast) 137 if (object->style()->imageRendering() == ImageRenderingOptimizeContrast)
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // This object has been resized to two different sizes while the timer 207 // This object has been resized to two different sizes while the timer
208 // is active, so draw at low quality, set the flag for animated resizes and 208 // is active, so draw at low quality, set the flag for animated resizes and
209 // the object to the list for high quality redraw. 209 // the object to the list for high quality redraw.
210 set(object, innerMap, layer, scaledLayoutSize); 210 set(object, innerMap, layer, scaledLayoutSize);
211 m_animatedResizeIsActive = true; 211 m_animatedResizeIsActive = true;
212 restartTimer(); 212 restartTimer();
213 return true; 213 return true;
214 } 214 }
215 215
216 } // namespace WebCore 216 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/core/rendering/RenderMarquee.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698