Changeset 61710 in webkit
- Timestamp:
- Jun 23, 2010 2:52:30 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r61709 r61710 1 2010-06-23 Stephen White <senorblanco@chromium.org> 2 3 Reviewed by David Hyatt. 4 5 Temporarily put the tests broken by the resize change into 6 test_expectations.txt. 7 https://bugs.webkit.org/show_bug.cgi?id=41036 8 9 * platform/chromium/test_expectations.txt: 10 1 11 2010-06-23 Abhishek Arya <inferno@chromium.org> 2 12 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r61670 r61710 2889 2889 BUGWK37538 : printing/page-format-data.html = TEXT 2890 2890 2891 // These need to be rebaselined after 2892 // https://bugs.webkit.org/show_bug.cgi?id=41036 2893 BUG_SENORBLANCO WIN LINUX : css2.1/t090501-c414-flt-03-b-g.html = IMAGE 2894 BUG_SENORBLANCO WIN LINUX : css2.1/t090501-c5525-flt-l-00-b-g.html = IMAGE 2895 BUG_SENORBLANCO WIN LINUX : css2.1/t090501-c5525-flt-r-00-b-g.html = IMAGE 2896 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize01.html = IMAGE 2897 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize02.html = IMAGE 2898 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize04.html = IMAGE 2899 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize05.html = IMAGE 2900 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize06.html = IMAGE 2901 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize07.html = IMAGE 2902 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize08.html = IMAGE 2903 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize09.html = IMAGE 2904 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize10.html = IMAGE 2905 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize11.html = IMAGE 2906 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize12.html = IMAGE 2907 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize13.html = IMAGE 2908 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize14.html = IMAGE 2909 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize15.html = IMAGE 2910 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize16.html = IMAGE 2911 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize17.html = IMAGE 2912 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize18.html = IMAGE 2913 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize19.html = IMAGE 2914 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize20.html = IMAGE 2915 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize21.html = IMAGE 2916 BUG_SENORBLANCO WIN LINUX : fast/backgrounds/size/backgroundSize22.html = IMAGE 2917 BUG_SENORBLANCO WIN LINUX : fast/block/positioning/replaced-inside-fixed-top-bottom.html = IMAGE 2918 BUG_SENORBLANCO WIN LINUX : fast/css/value-list-out-of-bounds-crash.html = IMAGE 2919 BUG_SENORBLANCO WIN LINUX : fast/events/pointer-events-2.html = IMAGE 2920 BUG_SENORBLANCO WIN LINUX : fast/forms/input-type-change.html = IMAGE 2921 BUG_SENORBLANCO WIN LINUX : fast/replaced/absolute-image-sizing.html = IMAGE 2922 BUG_SENORBLANCO WIN LINUX : fast/replaced/image-sizing.html = IMAGE 2923 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug101674.html = IMAGE 2924 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug11026.html = IMAGE 2925 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug1188.html = IMAGE 2926 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug1296.html = IMAGE 2927 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug1430.html = IMAGE 2928 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug14929.html = IMAGE 2929 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug15544.html = IMAGE 2930 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug2981-2.html = IMAGE 2931 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug4093.html = IMAGE 2932 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug4284.html = IMAGE 2933 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug4427.html = IMAGE 2934 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug56563.html = IMAGE 2935 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug625.html = IMAGE 2936 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug6404.html = IMAGE 2937 BUG_SENORBLANCO WIN LINUX : tables/mozilla/bugs/bug97383.html = IMAGE 2938 BUG_SENORBLANCO WIN LINUX : tables/mozilla/core/bloomberg.html = IMAGE 2939 BUG_SENORBLANCO WIN LINUX : tables/mozilla/core/col_widths_auto_autoFix.html = IMAGE 2940 BUG_SENORBLANCO WIN LINUX : tables/mozilla/core/misc.html = IMAGE 2941 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tbody_valign_baseline.html = IMAGE 2942 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tbody_valign_bottom.html = IMAGE 2943 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tbody_valign_middle.html = IMAGE 2944 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tbody_valign_top.html = IMAGE 2945 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/td_valign_baseline.html = IMAGE 2946 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/td_valign_bottom.html = IMAGE 2947 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/td_valign_middle.html = IMAGE 2948 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/td_valign_top.html = IMAGE 2949 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tfoot_valign_baseline.html = IMAGE 2950 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tfoot_valign_bottom.html = IMAGE 2951 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tfoot_valign_middle.html = IMAGE 2952 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tfoot_valign_top.html = IMAGE 2953 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/th_valign_baseline.html = IMAGE 2954 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/th_valign_bottom.html = IMAGE 2955 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/th_valign_middle.html = IMAGE 2956 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/th_valign_top.html = IMAGE 2957 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/thead_valign_baseline.html = IMAGE 2958 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/thead_valign_bottom.html = IMAGE 2959 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/thead_valign_middle.html = IMAGE 2960 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/thead_valign_top.html = IMAGE 2961 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tr_valign_baseline.html = IMAGE 2962 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tr_valign_bottom.html = IMAGE 2963 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tr_valign_middle.html = IMAGE 2964 BUG_SENORBLANCO WIN LINUX : tables/mozilla/marvin/tr_valign_top.html = IMAGE 2965 BUG_SENORBLANCO WIN LINUX : tables/mozilla/other/cell_widths.html = IMAGE 2966 BUG_SENORBLANCO WIN LINUX : tables/mozilla_expected_failures/bugs/97619.html = IMAGE 2967 BUG_SENORBLANCO WIN LINUX : tables/mozilla_expected_failures/bugs/bug6933.html = IMAGE 2968 2969 BUG_SENORBLANCO MAC : css2.1/t0804-c5510-padn-00-b-ag.html = IMAGE 2970 BUG_SENORBLANCO MAC : css2.1/t0905-c414-flt-01-d-g.html = IMAGE 2971 BUG_SENORBLANCO MAC : css2.1/t090501-c414-flt-02-d-g.html = IMAGE 2972 BUG_SENORBLANCO MAC : css2.1/t090501-c414-flt-03-b-g.html = IMAGE 2973 BUG_SENORBLANCO MAC : css2.1/t090501-c414-flt-ln-01-d-g.html = IMAGE 2974 BUG_SENORBLANCO MAC : css2.1/t090501-c5525-flt-l-00-b-g.html = IMAGE 2975 BUG_SENORBLANCO MAC : css2.1/t090501-c5525-flt-r-00-b-g.html = IMAGE 2976 BUG_SENORBLANCO MAC : css2.1/t100304-c43-rpl-bbx-00-d-g.html = IMAGE 2977 BUG_SENORBLANCO MAC : css2.1/t100304-c43-rpl-bbx-01-d-g.html = IMAGE 2978 BUG_SENORBLANCO MAC : css2.1/t1004-c5524-width-00-b-g.html = IMAGE 2979 BUG_SENORBLANCO MAC : css2.1/t100801-c544-valgn-02-d-agi.html = IMAGE 2980 BUG_SENORBLANCO MAC : css2.1/t100801-c544-valgn-03-d-agi.html = IMAGE 2981 BUG_SENORBLANCO MAC : css2.1/t100801-c544-valgn-04-d-agi.html = IMAGE 2982 BUG_SENORBLANCO MAC : fast/backgrounds/repeat/mask-negative-offset-repeat.html = IMAGE 2983 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize01.html = IMAGE 2984 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize05.html = IMAGE 2985 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize06.html = IMAGE 2986 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize07.html = IMAGE 2987 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize08.html = IMAGE 2988 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize09.html = IMAGE 2989 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize10.html = IMAGE 2990 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize11.html = IMAGE 2991 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize12.html = IMAGE 2992 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize16.html = IMAGE 2993 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize17.html = IMAGE 2994 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize18.html = IMAGE 2995 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize19.html = IMAGE 2996 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize20.html = IMAGE 2997 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize21.html = IMAGE 2998 BUG_SENORBLANCO MAC : fast/backgrounds/size/backgroundSize22.html = IMAGE 2999 BUG_SENORBLANCO MAC : fast/backgrounds/size/zero.html = IMAGE 3000 BUG_SENORBLANCO MAC : fast/block/positioning/replaced-inside-fixed-top-bottom.html = IMAGE 3001 BUG_SENORBLANCO MAC : fast/canvas/canvas-as-image.html = IMAGE 3002 BUG_SENORBLANCO MAC : fast/css/value-list-out-of-bounds-crash.html = IMAGE 3003 BUG_SENORBLANCO MAC : fast/forms/input-type-change.html = IMAGE 3004 BUG_SENORBLANCO MAC : fast/replaced/001.html = IMAGE 3005 BUG_SENORBLANCO MAC : fast/replaced/002.html = IMAGE 3006 BUG_SENORBLANCO MAC : fast/replaced/003.html = IMAGE 3007 BUG_SENORBLANCO MAC : fast/replaced/absolute-image-sizing.html = IMAGE 3008 BUG_SENORBLANCO MAC : fast/replaced/image-sizing.html = IMAGE 3009 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug11026.html = IMAGE 3010 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug1188.html = IMAGE 3011 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug1296.html = IMAGE 3012 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug1430.html = IMAGE 3013 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug14929.html = IMAGE 3014 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug15544.html = IMAGE 3015 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug23235.html = IMAGE 3016 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug2981-2.html = IMAGE 3017 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug4093.html = IMAGE 3018 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug4284.html = IMAGE 3019 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug4427.html = IMAGE 3020 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug4523.html = IMAGE 3021 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug56563.html = IMAGE 3022 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug6404.html = IMAGE 3023 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug86708.html = IMAGE 3024 BUG_SENORBLANCO MAC : tables/mozilla/bugs/bug97383.html = IMAGE 3025 BUG_SENORBLANCO MAC : tables/mozilla/core/col_widths_auto_autoFix.html = IMAGE 3026 BUG_SENORBLANCO MAC : tables/mozilla/core/misc.html = IMAGE 3027 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tbody_valign_baseline.html = IMAGE 3028 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tbody_valign_bottom.html = IMAGE 3029 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tbody_valign_middle.html = IMAGE 3030 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tbody_valign_top.html = IMAGE 3031 BUG_SENORBLANCO MAC : tables/mozilla/marvin/td_valign_baseline.html = IMAGE 3032 BUG_SENORBLANCO MAC : tables/mozilla/marvin/td_valign_bottom.html = IMAGE 3033 BUG_SENORBLANCO MAC : tables/mozilla/marvin/td_valign_middle.html = IMAGE 3034 BUG_SENORBLANCO MAC : tables/mozilla/marvin/td_valign_top.html = IMAGE 3035 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tfoot_valign_baseline.html = IMAGE 3036 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tfoot_valign_bottom.html = IMAGE 3037 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tfoot_valign_middle.html = IMAGE 3038 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tfoot_valign_top.html = IMAGE 3039 BUG_SENORBLANCO MAC : tables/mozilla/marvin/th_valign_baseline.html = IMAGE 3040 BUG_SENORBLANCO MAC : tables/mozilla/marvin/th_valign_bottom.html = IMAGE 3041 BUG_SENORBLANCO MAC : tables/mozilla/marvin/th_valign_middle.html = IMAGE 3042 BUG_SENORBLANCO MAC : tables/mozilla/marvin/th_valign_top.html = IMAGE 3043 BUG_SENORBLANCO MAC : tables/mozilla/marvin/thead_valign_baseline.html = IMAGE 3044 BUG_SENORBLANCO MAC : tables/mozilla/marvin/thead_valign_bottom.html = IMAGE 3045 BUG_SENORBLANCO MAC : tables/mozilla/marvin/thead_valign_middle.html = IMAGE 3046 BUG_SENORBLANCO MAC : tables/mozilla/marvin/thead_valign_top.html = IMAGE 3047 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tr_valign_baseline.html = IMAGE 3048 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tr_valign_bottom.html = IMAGE 3049 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tr_valign_middle.html = IMAGE 3050 BUG_SENORBLANCO MAC : tables/mozilla/marvin/tr_valign_top.html = IMAGE 3051 BUG_SENORBLANCO MAC : tables/mozilla_expected_failures/bugs/97619.html = IMAGE 3052 BUG_SENORBLANCO MAC : tables/mozilla_expected_failures/bugs/bug6933.html = IMAGE -
trunk/WebCore/ChangeLog
r61709 r61710 1 2010-06-23 Stephen White <senorblanco@chromium.org> 2 3 Reviewed by David Hyatt. 4 5 This is a tweak to the resize algorithm introduced in r61341, and 6 is a fix for the regression described in 7 https://bugs.webkit.org/show_bug.cgi?id=41036 8 9 The goal is to bring back the some of old behaviour, without regressing 10 too much of the performance gains in r61341. 11 12 The old algorithm was: 13 - on first resize, draw in high quality and record the paint time 14 - if we've already drawn at this size, use the same quality as last time 15 - on subsequent resizes, if the resize occurs within X ms of the 16 previous one, draw at low quality and set a timer (one timer per 17 image). 18 - when each timer expires, draw that image at high quality 19 20 The r61341 algorithm was: 21 - on first resize, draw the image in low quality, add it to a list of 22 resized images, and set a timer (one timer for all images) 23 - when the timer expires, redraw all resized images in high quality 24 25 The new algorithm is: 26 - on first resize, if no other animated resizes are outstanding, draw in 27 high quality and set the timer (one timer for all images) 28 - if any images have been resized to two different sizes in the last 29 X ms, draw all resized images in low quality and kick the timer 30 forward 31 - when the timer expires, if any animated resizes occured, redraw all 32 resized images in high quality, and reset the flag 33 34 This should cause GUIMark and the IE9 demos to have good performance 35 after the first frame, while other pages with only static resizes 36 should be unaffected. 37 38 * rendering/RenderBoxModelObject.cpp: 39 Change the LastPaintTimeMap to a LastPaintSizeMap: we now record the 40 last size an image was resized to, rather than the time it was painted 41 (the time actually became redundant in r61341 when I added the 42 check for m_timer.isActive(): we only care if anything is resizing 43 while the timer is active). 44 (WebCore::ImageQualityController::ImageQualityController): 45 Add an initializer for the m_animatedResizeIsActive flag. 46 (WebCore::ImageQualityController::objectDestroyed): 47 Reset the m_animatedResizeIsActive flag if this was the last object 48 in the list. 49 (WebCore::ImageQualityController::highQualityRepaintTimerFired): 50 Only repaint all the images if there was an animated resize (otherwise, 51 everything is already high quality). 52 (WebCore::ImageQualityController::shouldPaintAtLowQuality): 53 Implement the above algorithm. 54 1 55 2010-06-23 Abhishek Arya <inferno@chromium.org> 2 56 -
trunk/WebCore/rendering/RenderBoxModelObject.cpp
r61341 r61710 50 50 static const double cLowQualityTimeThreshold = 0.500; // 500 ms 51 51 52 typedef HashMap<RenderBoxModelObject*, double> LastPaintTimeMap;52 typedef HashMap<RenderBoxModelObject*, IntSize> LastPaintSizeMap; 53 53 54 54 class ImageQualityController : public Noncopyable { … … 62 62 void restartTimer(); 63 63 64 LastPaint TimeMap m_lastPaintTimeMap;64 LastPaintSizeMap m_lastPaintSizeMap; 65 65 Timer<ImageQualityController> m_timer; 66 bool m_animatedResizeIsActive; 66 67 }; 67 68 68 69 ImageQualityController::ImageQualityController() 69 70 : m_timer(this, &ImageQualityController::highQualityRepaintTimerFired) 71 , m_animatedResizeIsActive(false) 70 72 { 71 73 } … … 73 75 void ImageQualityController::objectDestroyed(RenderBoxModelObject* object) 74 76 { 75 m_lastPaintTimeMap.remove(object); 76 if (m_lastPaintTimeMap.isEmpty()) 77 m_lastPaintSizeMap.remove(object); 78 if (m_lastPaintSizeMap.isEmpty()) { 79 m_animatedResizeIsActive = false; 77 80 m_timer.stop(); 81 } 78 82 } 79 83 80 84 void ImageQualityController::highQualityRepaintTimerFired(Timer<ImageQualityController>*) 81 85 { 82 for (LastPaintTimeMap::iterator it = m_lastPaintTimeMap.begin(); it != m_lastPaintTimeMap.end(); ++it) 83 it->first->repaint(); 86 if (m_animatedResizeIsActive) { 87 m_animatedResizeIsActive = false; 88 for (LastPaintSizeMap::iterator it = m_lastPaintSizeMap.begin(); it != m_lastPaintSizeMap.end(); ++it) 89 it->first->repaint(); 90 } 84 91 } 85 92 86 93 void ImageQualityController::restartTimer() 87 94 { 88 m_timer.startOneShot(cLowQualityTimeThreshold * 1.05);95 m_timer.startOneShot(cLowQualityTimeThreshold); 89 96 } 90 97 … … 101 108 102 109 // Look ourselves up in the hashtable. 103 LastPaint TimeMap::iterator i = m_lastPaintTimeMap.find(object);110 LastPaintSizeMap::iterator i = m_lastPaintSizeMap.find(object); 104 111 105 112 const AffineTransform& currentTransform = context->getCTM(); … … 107 114 if (!contextIsScaled && imageSize == size) { 108 115 // There is no scale in effect. If we had a scale in effect before, we can just remove this object from the list. 109 if (i != m_lastPaint TimeMap.end())110 m_lastPaint TimeMap.remove(object);116 if (i != m_lastPaintSizeMap.end()) 117 m_lastPaintSizeMap.remove(object); 111 118 112 119 return false; … … 119 126 return true; 120 127 } 121 double newTime = currentTime(); 122 if (i != m_lastPaintTimeMap.end() && newTime - i->second >= cLowQualityTimeThreshold && !m_timer.isActive()) { 123 // If it has been at least cLowQualityTimeThreshold seconds since the 124 // last time a resize was requested, and the timer is no longer active, 125 // draw at high quality and don't set the timer. 128 // If this is the first time resizing this image, or its size is the 129 // same as the last resize, draw at high res, but record the paint 130 // size and set the timer. 131 if (i == m_lastPaintSizeMap.end() || size == i->second) { 132 restartTimer(); 133 m_lastPaintSizeMap.set(object, size); 134 return false; 135 } 136 // If an animated resize is active, paint in low quality and kick the timer ahead. 137 if (m_animatedResizeIsActive) { 138 m_lastPaintSizeMap.set(object, size); 139 restartTimer(); 140 return true; 141 } 142 // If the timer is no longer active, draw at high quality and don't 143 // set the timer. 144 if (!m_timer.isActive()) { 126 145 objectDestroyed(object); 127 146 return false; 128 147 } 129 // Draw at low quality first and set a timer for high quality. 130 m_lastPaintTimeMap.set(object, newTime); 148 // This object has been resized to two different sizes while the timer 149 // is active, so draw at low quality, set the flag for animated resizes and 150 // the object to the list for high quality redraw. 151 m_lastPaintSizeMap.set(object, size); 152 m_animatedResizeIsActive = true; 131 153 restartTimer(); 132 154 return true;
Note: See TracChangeset
for help on using the changeset viewer.