Changeset 150035 in webkit
- Timestamp:
- May 13, 2013 1:29:52 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r150031 r150035 1 2013-05-13 Philippe Normand <pnormand@igalia.com> 2 3 Unreviewed, rolling out r150014. 4 http://trac.webkit.org/changeset/150014 5 https://bugs.webkit.org/show_bug.cgi?id=86410 6 7 Broke video playback on WK2 and some webgl tests 8 9 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: 10 (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): 11 (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): 12 (WebCore::MediaPlayerPrivateGStreamerBase::paint): 13 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: 14 (MediaPlayerPrivateGStreamerBase): 15 1 16 2013-05-13 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 17 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r150014 r150035 112 112 , m_volumeSignalHandler(0) 113 113 , m_muteSignalHandler(0) 114 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL)115 , m_texture(0)116 #endif117 114 { 118 115 } … … 301 298 } 302 299 303 304 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL)305 void MediaPlayerPrivateGStreamerBase::updateTexture(GstBuffer* buffer)306 {307 if (!m_texture)308 return;309 310 if (!client())311 return;312 313 const void* srcData = 0;314 IntSize size = naturalSize();315 316 if (m_texture->size() != size)317 m_texture->reset(size);318 319 #ifdef GST_API_VERSION_1320 GstMapInfo srcInfo;321 gst_buffer_map(buffer, &srcInfo, GST_MAP_READ);322 srcData = srcInfo.data;323 #else324 srcData = GST_BUFFER_DATA(buffer);325 #endif326 327 // @TODO: support cropping328 m_texture->updateContents(srcData, WebCore::IntRect(WebCore::IntPoint(0, 0), size), WebCore::IntPoint(0, 0), size.width() * 4, BitmapTexture::UpdateCannotModifyOriginalImageData);329 330 #ifdef GST_API_VERSION_1331 gst_buffer_unmap(buffer, &srcInfo);332 #endif333 334 client()->setPlatformLayerNeedsDisplay();335 }336 #endif337 338 300 void MediaPlayerPrivateGStreamerBase::triggerRepaint(GstBuffer* buffer) 339 301 { 340 302 g_return_if_fail(GST_IS_BUFFER(buffer)); 341 342 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL) 343 if (supportsAcceleratedRendering() && m_player->mediaPlayerClient()->mediaPlayerRenderingCanBeAccelerated(m_player)) 344 updateTexture(buffer); 345 else 346 #endif 347 { 348 gst_buffer_replace(&m_buffer, buffer); 349 m_player->repaint(); 350 } 303 gst_buffer_replace(&m_buffer, buffer); 304 m_player->repaint(); 351 305 } 352 306 … … 358 312 void MediaPlayerPrivateGStreamerBase::paint(GraphicsContext* context, const IntRect& rect) 359 313 { 360 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL)361 if (m_texture)362 return;363 #endif364 365 314 if (context->paintingDisabled()) 366 315 return; … … 383 332 rect, gstImage->rect(), CompositeCopy, DoNotRespectImageOrientation, false); 384 333 } 385 386 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL)387 void MediaPlayerPrivateGStreamerBase::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity)388 {389 if (textureMapper->accelerationMode() != TextureMapper::OpenGLMode)390 return;391 392 if (!m_texture) {393 m_texture = textureMapper->acquireTextureFromPool(naturalSize());394 return;395 }396 397 textureMapper->drawTexture(*m_texture.get(), targetRect, matrix, opacity);398 }399 #endif400 334 401 335 #if USE(NATIVE_FULLSCREEN_VIDEO) -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h
r150014 r150035 30 30 #include <wtf/Forward.h> 31 31 32 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL)33 #include "TextureMapperPlatformLayer.h"34 #endif35 36 32 typedef struct _GstBuffer GstBuffer; 37 33 typedef struct _GstElement GstElement; … … 48 44 class GStreamerGWorld; 49 45 50 class MediaPlayerPrivateGStreamerBase : public MediaPlayerPrivateInterface 51 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL) 52 , public TextureMapperPlatformLayer 53 #endif 54 { 46 class MediaPlayerPrivateGStreamerBase : public MediaPlayerPrivateInterface { 55 47 56 48 public: … … 102 94 unsigned videoDecodedByteCount() const; 103 95 104 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL)105 virtual PlatformLayer* platformLayer() const { return const_cast<MediaPlayerPrivateGStreamerBase*>(this); }106 virtual bool supportsAcceleratedRendering() const { return true; }107 virtual void paintToTextureMapper(TextureMapper*, const FloatRect&, const TransformationMatrix&, float);108 #endif109 110 96 protected: 111 97 MediaPlayerPrivateGStreamerBase(MediaPlayer*); … … 134 120 GRefPtr<GstPad> m_videoSinkPad; 135 121 mutable IntSize m_videoSize; 136 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL)137 void updateTexture(GstBuffer*);138 RefPtr<BitmapTexture> m_texture;139 #endif140 122 }; 141 123 }
Note: See TracChangeset
for help on using the changeset viewer.