diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index 7a0e66aa6e9b4..51c6fc8cc81c1 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -3747,6 +3747,7 @@ void HTMLMediaElement::play()
void HTMLMediaElement::playInternal()
{
ALWAYS_LOG(LOGIDENTIFIER);
+ bool wasSeeking = seeking();
if (isSuspended()) {
ALWAYS_LOG(LOGIDENTIFIER, "returning because context is suspended");
@@ -3764,6 +3765,12 @@ void HTMLMediaElement::playInternal()
return;
}
+ ALWAYS_LOG(LOGIDENTIFIER, "suresh m_seekRequested:", m_seekRequested, "wasSeeking:" , wasSeeking);
+ if (m_seekRequested) {
+ ALWAYS_LOG(LOGIDENTIFIER, "suresh no need to change the playstate");
+ return;
+ }
+
// 4.8.10.9. Playing the media resource
if (!m_player || m_networkState == NETWORK_EMPTY)
selectMediaResource();
diff --git a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp b/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
index 8e36e58a2a4d4..bc3b63f3a4fb8 100644
--- a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
+++ b/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
@@ -42,6 +42,7 @@
#include
#include
#include
+#include
#if ENABLE(ACCELERATED_2D_CANVAS)
#include
@@ -57,6 +58,9 @@ namespace {
namespace WebCore {
+static cairo_user_data_key_t s_surfaceUniqueIDKey;
+static Atomic s_surfaceUniqueID = 1;
+
#if USE(FREETYPE)
RecursiveLock& cairoFontLock()
{
@@ -403,6 +407,16 @@ void renderingStarted()
}
}
+void attachSurfaceUniqueID(cairo_surface_t* surface)
+{
+ cairo_surface_set_user_data(surface, &s_surfaceUniqueIDKey, reinterpret_cast(s_surfaceUniqueID.exchangeAdd(1)), nullptr);
+}
+
+uintptr_t getSurfaceUniqueID(cairo_surface_t* surface)
+{
+ return reinterpret_cast(cairo_surface_get_user_data(surface, &s_surfaceUniqueIDKey));
+}
+
} // namespace WebCore
#endif // USE(CAIRO)
diff --git a/Source/WebCore/platform/graphics/cairo/CairoUtilities.h b/Source/WebCore/platform/graphics/cairo/CairoUtilities.h
index 61bd691c00650..f41fc4a9eb21a 100644
--- a/Source/WebCore/platform/graphics/cairo/CairoUtilities.h
+++ b/Source/WebCore/platform/graphics/cairo/CairoUtilities.h
@@ -98,6 +98,8 @@ void flipImageSurfaceVertically(cairo_surface_t*);
RefPtr toCairoRegion(const Region&);
cairo_matrix_t toCairoMatrix(const AffineTransform&);
+void attachSurfaceUniqueID(cairo_surface_t*);
+uintptr_t getSurfaceUniqueID(cairo_surface_t*);
void resetRenderingStartedFlag();
void setRenderingStartedFlag();
diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
index 242eac9d5e336..00b5cca101c8b 100644
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
@@ -25,7 +25,7 @@
#include "CoordinatedGraphicsLayer.h"
#if USE(COORDINATED_GRAPHICS)
-
+#include "CairoUtilities.h"
#include "FloatQuad.h"
#include "GraphicsContext.h"
#include "GraphicsLayer.h"
@@ -903,7 +903,9 @@ void CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly()
ASSERT(m_compositedImage);
auto& image = *m_compositedImage;
uintptr_t imageID = reinterpret_cast(&image);
- uintptr_t nativeImageID = reinterpret_cast(m_compositedNativeImage->platformImage().get());
+ //uintptr_t nativeImageID = reinterpret_cast(m_compositedNativeImage->platformImage().get());
+
+ uintptr_t nativeImageID = getSurfaceUniqueID(m_compositedNativeImage->platformImage().get());
// Respawn the ImageBacking object if the underlying image changed.
if (m_nicosia.imageBacking) {
@@ -923,7 +925,8 @@ void CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly()
auto& layerState = impl.layerState();
layerState.imageID = imageID;
layerState.update.isVisible = transformedVisibleRect().intersects(IntRect(contentsRect()));
- if (layerState.update.isVisible && layerState.update.nativeImageID != nativeImageID) {
+ if (layerState.update.isVisible && (!nativeImageID || layerState.update.nativeImageID != nativeImageID)) {
+ //if (layerState.update.isVisible && layerState.update.nativeImageID != nativeImageID) {
layerState.update.nativeImageID = nativeImageID;
layerState.update.imageBackingStore = m_coordinator->imageBackingStore(nativeImageID,
[&] {
diff --git a/Source/WebCore/platform/image-decoders/cairo/ImageBackingStoreCairo.cpp b/Source/WebCore/platform/image-decoders/cairo/ImageBackingStoreCairo.cpp
index 4a21255a8c0fb..a4eb6930ea9da 100644
--- a/Source/WebCore/platform/image-decoders/cairo/ImageBackingStoreCairo.cpp
+++ b/Source/WebCore/platform/image-decoders/cairo/ImageBackingStoreCairo.cpp
@@ -24,6 +24,7 @@
*/
#include "config.h"
+#include "CairoUtilities.h"
#include "ImageBackingStore.h"
#include
@@ -41,7 +42,7 @@ PlatformImagePtr ImageBackingStore::image() const
static_cast(data)->deref();
});
+ attachSurfaceUniqueID(surface.get());
return surface;
}
-
} // namespace WebCore