From 41270bedebc66c74e97b45c7bcdbd2b90537c280 Mon Sep 17 00:00:00 2001 From: Michael Schuldt Date: Fri, 5 Jul 2013 12:34:26 +0200 Subject: [PATCH] LayerManagerBase: added property 'synchronized' to scene object Signed-off-by: Michael Schuldt --- LayerManagerBase/include/GraphicalObject.h | 40 ++++++++++++++++++++++++++++- LayerManagerBase/include/GraphicalSurface.h | 3 +++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/LayerManagerBase/include/GraphicalObject.h b/LayerManagerBase/include/GraphicalObject.h index 542c57b..4c6775e 100644 --- a/LayerManagerBase/include/GraphicalObject.h +++ b/LayerManagerBase/include/GraphicalObject.h @@ -1,4 +1,4 @@ -/*************************************************************************** + /*************************************************************************** * * Copyright 2010,2011 BMW Car IT GmbH * Copyright (C) 2012 DENSO CORPORATION and Robert Bosch Car Multimedia Gmbh @@ -85,6 +85,25 @@ public: */ void getChromaKey(unsigned char& red, unsigned char& green, unsigned char& blue) const; + + /** + * Set the synchronized compositing flag for this object. + * Synchronized composition forces screen updates, if all synchronized objects are + * were updated, otherwise the composition is freezed. + * @param[in] newSynchnronized set this object synchronized (true) or not (false) + * @return TRUE if the new synchronized value is not equal to the current synchronized value + * FALSE if they are equal + */ + bool setSynchronized(bool newSynchnronized); + + /** + * Get the synchronized compositing flag for this object. + * @param[in] newSynchnronized set this object synchronized (true) or not (false) + * @return TRUE if the synchronized value is set + * FALSE if they synchronized value is unset + */ + bool getSynchronized() const; + /** * Set the visibility * @param[in] newVisibility set this object visible (true) or invisible (false) @@ -149,6 +168,7 @@ public: Shader* shader; double opacity; bool visibility; + bool synchronized; bool chromaKeyEnabled; unsigned char chromaKeyRed; unsigned char chromaKeyGreen; @@ -171,6 +191,7 @@ inline GraphicalObject::GraphicalObject(ObjectType type, double opacity, bool vi , shader(0) , opacity(opacity) , visibility(visibility) +, synchronized(false) , chromaKeyEnabled(false) , chromaKeyRed(0) , chromaKeyGreen(0) @@ -188,6 +209,7 @@ inline GraphicalObject::GraphicalObject(int externalId, ObjectType type, double , shader(0) , opacity(opacity) , visibility(visibility) +, synchronized(false) , chromaKeyEnabled(false) , chromaKeyRed(0) , chromaKeyGreen(0) @@ -225,6 +247,22 @@ inline bool GraphicalObject::setVisibility(bool newVisibility) return false; } +inline bool GraphicalObject::setSynchronized(bool newSynchnronized) +{ + if (synchronized != newSynchnronized) + { + synchronized = newSynchnronized; + return true; + } + return synchronized; +} + +inline bool GraphicalObject::getSynchronized() const +{ + return synchronized; +} + + inline bool GraphicalObject::getVisibility() const { return visibility; diff --git a/LayerManagerBase/include/GraphicalSurface.h b/LayerManagerBase/include/GraphicalSurface.h index dd070a5..454ce00 100644 --- a/LayerManagerBase/include/GraphicalSurface.h +++ b/LayerManagerBase/include/GraphicalSurface.h @@ -103,6 +103,7 @@ public: int OriginalSourceWidth; int OriginalSourceHeight; bool m_surfaceResized; + bool m_resizesync; private: OrientationType m_orientation; // Rotation of the graphical content @@ -116,6 +117,7 @@ inline GraphicalSurface::GraphicalSurface(ObjectType type, int creatorPid) , OriginalSourceWidth(0) , OriginalSourceHeight(0) , m_surfaceResized(false) +, m_resizesync(false) , m_orientation(Zero) , m_sourceViewport(0, 0, 0, 0) , m_destinationViewport(0, 0, 0, 0) @@ -127,6 +129,7 @@ inline GraphicalSurface::GraphicalSurface(int externalId, ObjectType type, int c , OriginalSourceWidth(0) , OriginalSourceHeight(0) , m_surfaceResized(false) +, m_resizesync(false) , m_orientation(Zero) , m_sourceViewport(0, 0, 0, 0) , m_destinationViewport(0, 0, 0, 0) -- 2.7.4