Changeset 83558 in webkit
- Timestamp:
- Apr 11, 2011 11:03:51 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r83555 r83558 1 2011-04-11 Vangelis Kokkevis <vangelis@chromium.org> 2 3 Reviewed by James Robinson. 4 5 Adding a test which verifies that compositing image layers 6 update correctly when their contents change. 7 https://bugs.webkit.org/show_bug.cgi?id=58181 8 9 * compositing/images/content-image-change-expected.txt: Added. 10 * compositing/images/content-image-change.html: Added. 11 * platform/chromium/test_expectations.txt: 12 * platform/mac/compositing/images/content-image-change-expected.checksum: Added. 13 * platform/mac/compositing/images/content-image-change-expected.png: Added. 14 1 15 2011-04-11 Simon Fraser <simon.fraser@apple.com> 2 16 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r83541 r83558 2855 2855 WONTFIX GPU MAC LEOPARD : media = IMAGE PASS 2856 2856 2857 // Will need windows and linux baselines 2858 BUGWK58182 GPU : compositing/images/content-image-change.html = PASS FAIL 2859 2857 2860 // The picture does not match the video in the test. 2858 2861 BUGWK55519 GPU WIN LINUX : compositing/video/video-background-color.html = IMAGE+TEXT -
trunk/Source/WebCore/ChangeLog
r83555 r83558 1 2011-04-11 Vangelis Kokkevis <vangelis@chromium.org> 2 3 Reviewed by James Robinson. 4 5 [chromium] Properly invalidate the contents of ImageLayerChromium's 6 when the actual image contents change. 7 https://bugs.webkit.org/show_bug.cgi?id=58181 8 9 Test: compositing/images/content-image-change.html 10 11 * platform/graphics/chromium/ContentLayerChromium.cpp: 12 (WebCore::ContentLayerChromium::updateTexture): 13 * platform/graphics/chromium/ImageLayerChromium.cpp: 14 (WebCore::ImageLayerChromium::ImageLayerChromium): 15 (WebCore::ImageLayerChromium::setContents): 16 (WebCore::ImageLayerChromium::paintContentsIfDirty): 17 * platform/graphics/chromium/ImageLayerChromium.h: 18 1 19 2011-04-11 Simon Fraser <simon.fraser@apple.com> 2 20 -
trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
r83511 r83558 193 193 m_uploadUpdateRect = IntRect(IntPoint(0, 0), size); 194 194 195 if (m_uploadUpdateRect.isEmpty()) 196 return; 197 195 198 if (!m_contentsTexture->reserve(size, GraphicsContext3D::RGBA)) { 196 199 m_skipsDraw = true; -
trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
r83511 r83558 48 48 ImageLayerChromium::ImageLayerChromium(GraphicsLayerChromium* owner) 49 49 : ContentLayerChromium(owner) 50 , m_imageForCurrentFrame(0) 50 51 , m_contents(0) 51 52 { … … 54 55 void ImageLayerChromium::setContents(Image* contents) 55 56 { 56 // Check if the image has changed. 57 if (m_contents == contents) 57 // setContents() currently gets called whenever there is any 58 // style change that affects the layer even if that change doesn't 59 // affect the actual contents of the image (e.g. a CSS animation). 60 // With this check in place we avoid unecessary texture uploads. 61 if ((m_contents == contents) && (m_contents->nativeImageForCurrentFrame() == m_imageForCurrentFrame)) 58 62 return; 63 59 64 m_contents = contents; 65 m_imageForCurrentFrame = m_contents->nativeImageForCurrentFrame(); 66 m_dirtyRect = IntRect(IntPoint(0, 0), bounds()); 60 67 setNeedsDisplay(); 61 68 } … … 73 80 } 74 81 75 m_decodedImage.updateFromImage(m_contents->nativeImageForCurrentFrame()); 82 if (!m_dirtyRect.isEmpty()) { 83 m_decodedImage.updateFromImage(m_contents->nativeImageForCurrentFrame()); 84 m_uploadUpdateRect = IntRect(IntPoint(0, 0), m_decodedImage.size()); 85 } 76 86 } 77 87 -
trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.h
r83511 r83558 65 65 66 66 PlatformImage m_decodedImage; 67 NativeImagePtr m_imageForCurrentFrame; 67 68 RefPtr<Image> m_contents; 68 69 };
Note: See TracChangeset
for help on using the changeset viewer.