Changeset 166480 in webkit
- Timestamp:
- Mar 30, 2014 11:39:51 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r166474 r166480 1 2014-03-30 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 3 [GTK] [TextureMapper] Weird brightness with some videos with acceletared compositing 4 https://bugs.webkit.org/show_bug.cgi?id=130665 5 6 Reviewed by Martin Robinson. 7 8 When we uploaded a video texture to the mapper we were not 9 considering that some videos could be decoded into a format 10 without alpha component. Now we check if the video has alpha and 11 if it does not, we remove the alpha flag when retrieving the 12 texture from the pool. For this, the method to get the texture 13 from the pool was modified to receive the flags, that is mapped to 14 have alpha by default in order not to break any other existing 15 code. 16 17 Though we have a problem with AC in WTR and that makes it 18 currently not testable, no new tests are needed because once this 19 is fixed the current test set suffices to detect a possible 20 regression in this. 21 22 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: 23 (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Check 24 the video format and decide if the texture shall be pulled with 25 alpha support or not. 26 * platform/graphics/texmap/TextureMapper.cpp: 27 (WebCore::TextureMapper::acquireTextureFromPool): Use the flags 28 when resetting the texture. 29 * platform/graphics/texmap/TextureMapper.h: 30 (WebCore::BitmapTexture::Flag::None): Added with 0x00. 31 (WebCore::TextureMapper::acquireTextureFromPool): Added flag 32 parameter to set up the texture with the default for including 33 alpha channel. 34 1 35 2014-03-30 Jinwoo Song <jinwoo7.song@samsung.com> 2 36 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r166055 r166480 325 325 return 0; 326 326 327 RefPtr<BitmapTexture> texture = textureMapper->acquireTextureFromPool(size); 327 const GstVideoFormatInfo* formatInfo = gst_video_format_get_info(format); 328 329 RefPtr<BitmapTexture> texture = textureMapper->acquireTextureFromPool(size, GST_VIDEO_FORMAT_INFO_HAS_ALPHA(formatInfo) ? BitmapTexture::SupportsAlpha : BitmapTexture::NoFlag); 328 330 329 331 #if GST_CHECK_VERSION(1, 1, 0) -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp
r163079 r166480 122 122 } 123 123 124 PassRefPtr<BitmapTexture> TextureMapper::acquireTextureFromPool(const IntSize& size )124 PassRefPtr<BitmapTexture> TextureMapper::acquireTextureFromPool(const IntSize& size, const BitmapTexture::Flags flags) 125 125 { 126 126 RefPtr<BitmapTexture> selectedTexture = m_texturePool->acquireTexture(size, this); 127 selectedTexture->reset(size, BitmapTexture::SupportsAlpha);127 selectedTexture->reset(size, flags); 128 128 return selectedTexture; 129 129 } -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h
r163079 r166480 48 48 public: 49 49 enum Flag { 50 NoFlag = 0, 50 51 SupportsAlpha = 0x01 51 52 }; … … 157 158 virtual IntSize maxTextureSize() const = 0; 158 159 159 virtual PassRefPtr<BitmapTexture> acquireTextureFromPool(const IntSize& );160 virtual PassRefPtr<BitmapTexture> acquireTextureFromPool(const IntSize&, const BitmapTexture::Flags = BitmapTexture::SupportsAlpha); 160 161 161 162 void setPatternTransform(const TransformationMatrix& p) { m_patternTransform = p; }
Note: See TracChangeset
for help on using the changeset viewer.