Fix the issue that webgl displays nothing after returning from home screen.(on emulator)
authorYongGeol Jung <yg48.jung@samsung.com>
Wed, 10 Apr 2013 09:19:23 +0000 (18:19 +0900)
committerYongGeol Jung <yg48.jung@samsung.com>
Wed, 10 Apr 2013 09:50:23 +0000 (18:50 +0900)
[Title] Fix the issue that webgl displays nothing after returning from home screen.(on emulator)
[Issue#] N_SE-33336
[Problem] Webgl displays nothing after returning from home screen.
[Cause] Updating flag was not checked.
[Solution] Set updating flag before going to home screen.

Change-Id: I9f6968a1a64d87bf0286118253a1ec94f2fa7306

Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.h

index 015e539..5267752 100644 (file)
@@ -814,6 +814,21 @@ PassOwnPtr<WebCore::GraphicsContext> LayerTreeCoordinator::beginContentUpdate(co
     return m_updateAtlases.last()->beginPaintingOnAvailableBuffer(handle, size, offset);
 }
 
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC) && !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+void LayerTreeCoordinator::pauseRendering()
+{
+    m_isSuspended = true;
+#if ENABLE(WEBGL)
+    // Make sure compositing webgl layer after returning from home screen.
+    HashSet<WebCore::WebGraphicsLayer*>::iterator end = m_registeredLayers.end();
+    for (HashSet<WebCore::WebGraphicsLayer*>::iterator it = m_registeredLayers.begin(); it != end; ++it) {
+        if ((*it)->contentType() == WebLayerInfo::Canvas3DContentType)
+            (*it)->markCanvasPlatformLayerNeedsUpdate();
+    }
+#endif
+}
+#endif
+
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
 void LayerTreeCoordinator::freePlatformSurface(int layerID, int platformSurfaceId)
 {
index b752338..94ec95e 100644 (file)
@@ -59,7 +59,11 @@ public:
     virtual void setPageOverlayOpacity(float);
     virtual bool pageOverlayShouldApplyFadeWhenPainting() const { return false; }
 
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC) && !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+    virtual void pauseRendering();
+#else
     virtual void pauseRendering() { m_isSuspended = true; }
+#endif
     virtual void resumeRendering() { m_isSuspended = false; scheduleLayerFlush(); }
     virtual void deviceScaleFactorDidChange() { }
     virtual int64_t adoptImageBackingStore(WebCore::Image*);
index d21d812..59c0e73 100755 (executable)
@@ -209,6 +209,8 @@ public:
     void freePlatformSurface(int platformSurfaceID);
     void removePlatformSurface(int platformSurfaceID);
     bool swapPlatformSurfaces();
+#else
+    void markCanvasPlatformLayerNeedsUpdate() { m_canvasNeedsDisplay = true; }
 #endif
 #if ENABLE(TIZEN_ACCELERATED_2D_CANVAS_EFL)
     void flushPlatformSurfaces();