#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
, m_suspendedJavaScript(false)
#endif
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
- , m_compositedContentLayersCount(0)
-#endif
#if ENABLE(TIZEN_ONESHOT_DRAWING_SYNCHRONIZATION)
, m_needsOneShotDrawingSynchronization(false)
#endif
- , m_animationsLocked(false)
#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
, m_isGLAccelerationMode(true)
#endif
+ , m_animationsLocked(false)
{
// Create a root layer.
m_rootLayer = GraphicsLayer::create(this);
m_layerTreeContext.webLayerID = toWebGraphicsLayer(webRootLayer)->id();
m_nonCompositedContentLayer = GraphicsLayer::create(this);
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
- WebGraphicsLayer* webNonCompositedLayer = toWebGraphicsLayer(m_nonCompositedContentLayer.get());
- webNonCompositedLayer->setNonCompositedLayer(true);
-#endif
-
toWebGraphicsLayer(m_rootLayer.get())->setWebGraphicsLayerClient(this);
#ifndef NDEBUG
m_nonCompositedContentLayer->setName("LayerTreeCoordinator non-composited content");
// Add the accelerated layer tree hierarchy.
if (graphicsLayer)
m_nonCompositedContentLayer->addChild(graphicsLayer);
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
- m_compositedContentLayersCount = compositedContentLayersCount(m_nonCompositedContentLayer.get());
-#endif
}
void LayerTreeCoordinator::invalidate()
layer->setContentsScale(m_contentsScale);
layer->adjustVisibleRect();
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
- m_compositedContentLayersCount = compositedContentLayersCount(m_nonCompositedContentLayer.get());
-#endif
}
void LayerTreeCoordinator::detachLayer(WebGraphicsLayer* layer)
m_shouldSyncFrame = true;
m_webPage->send(Messages::LayerTreeCoordinatorProxy::DeleteCompositingLayer(layer->id()));
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
- m_compositedContentLayersCount = compositedContentLayersCount(m_nonCompositedContentLayer.get());
-#endif
-
#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
m_compositedContentLayers.remove(layer->id());
#endif
m_webPage->resumeAnimationController();
#endif
scheduleLayerFlush();
+#if ENABLE(TIZEN_DAILY_UPVERSIONING)
+ for (size_t i = 0; i < m_updateAtlases.size(); ++i)
+#else
for (int i = 0; i < m_updateAtlases.size(); ++i)
+#endif
m_updateAtlases[i]->didSwapBuffers();
#if ENABLE(TIZEN_SYNC_REQUEST_ANIMATION_FRAME)
PassOwnPtr<WebCore::GraphicsContext> LayerTreeCoordinator::beginContentUpdate(const WebCore::IntSize& size, ShareableBitmap::Flags flags, ShareableSurface::Handle& handle, WebCore::IntPoint& offset)
{
OwnPtr<WebCore::GraphicsContext> graphicsContext;
+#if ENABLE(TIZEN_DAILY_UPVERSIONING)
+ for (size_t i = 0; i < m_updateAtlases.size(); ++i) {
+#else
for (int i = 0; i < m_updateAtlases.size(); ++i) {
+#endif
UpdateAtlas* atlas = m_updateAtlases[i].get();
if (atlas->flags() == flags) {
// This will return null if there is no available buffer space.
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)
{
}
#endif
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-bool LayerTreeCoordinator::recordingSurfaceSetEnableGet()
-{
- return recordingSurfaceAllowed() && m_webPage->recordingSurfaceEnabled();
-}
-
-bool LayerTreeCoordinator::recordingSurfaceSetLoadStartGet()
-{
- if (m_webPage->recordingSurfaceLoadStart()) {
- m_webPage->setRecordingSurfaceLoadStart(false);
- return true;
- }
- return false;
-}
-
-bool LayerTreeCoordinator::recordingSurfaceSetLoadFinishedGet()
-{
- if (m_webPage->recordingSurfaceLoadFinish()) {
- m_webPage->setRecordingSurfaceLoadFinish(false);
- return true;
- }
- return false;
-}
-
-bool LayerTreeCoordinator::recordingSurfaceAllowed()
-{
- if (m_compositedContentLayersCount > 0)
- return false;
-
- return true;
-}
-
-int LayerTreeCoordinator::compositedContentLayersCount(GraphicsLayer* layer)
-{
- int count = 0;
- int contentType = toWebGraphicsLayer(layer)->contentType();
-
- if (contentType == WebLayerInfo::Canvas3DContentType || contentType == WebLayerInfo::MediaContentType || contentType == WebLayerInfo::Canvas2DContentType)
- count = 1;
-
- const Vector<GraphicsLayer*>& childLayers = layer->children();
- for (int i = 0; i < childLayers.size(); ++i)
- count += compositedContentLayersCount(childLayers[i]);
-
- return count;
-}
-#endif
-
#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION_ON_UI_SIDE)
void LayerTreeCoordinator::setVisibleContentsRectAndTrajectoryVectorForLayer(int layerID, const WebCore::IntRect& visibleRect, const WebCore::FloatPoint& trajectoryVector)
{
if (!contentsLayer)
return;
- toWebGraphicsLayer(contentsLayer)->setVisibleRect(visibleRect);
if (trajectoryVector != FloatPoint::zero()) {
m_webPage->scrollOverflowWithTrajectoryVector(trajectoryVector);
toWebGraphicsLayer(contentsLayer)->setVisibleContentRectTrajectoryVector(trajectoryVector);
#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_SCROLLBAR)
const Vector<GraphicsLayer*>& childLayers = contentsLayer->children();
- for (int i = 0; i < childLayers.size(); ++i)
+ for (size_t i = 0; i < childLayers.size(); ++i)
if (childLayers[i]->isScrollbar())
toWebGraphicsLayer(childLayers[i])->startAnimation();
#endif
contentsLayer->setPosition(-offset);
IntRect visibleRect(FloatRect(offset, scrollingLayer->size()));
- toWebGraphicsLayer(contentsLayer)->setVisibleRect(visibleRect);
// FIXME: Need to set trajectoryVector?
// FloatPoint trajectoryVector(scrollingLayer->trajectoryVector());