-#ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_TRACKER_H
-#define __DALI_INTERNAL_SCENE_GRAPH_RENDER_TRACKER_H
-
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+#ifndef __DALI_INTERNAL_RENDER_RENDER_TRACKER_H
+#define __DALI_INTERNAL_RENDER_RENDER_TRACKER_H
+
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
#include <dali/integration-api/gl-sync-abstraction.h>
#include <dali/internal/common/message.h>
+#include <atomic>
+
namespace Dali
{
namespace Internal
{
-namespace SceneGraph
+namespace Render
{
/**
public:
/**
* Constructor
- * @param[in] glSyncAbstraction The GlSyncAbstraction
- * @param[in] resourceId The resource ID of the framebuffer texture being tracked
*/
- RenderTracker(Integration::GlSyncAbstraction& glSyncAbstraction);
+ RenderTracker();
/**
* Destructor
- * Delete any outstanding sync objects?
*/
~RenderTracker();
/**
* Creates a sync object for this tracker. Will delete any existing sync object.
*/
- void CreateSyncObject();
+ void CreateSyncObject( Integration::GlSyncAbstraction& glSyncAbstraction );
/**
* Check the GL Sync objects. This is called from Render Thread.
void SetSyncFlag();
private:
- Integration::GlSyncAbstraction& mGlSyncAbstraction; // The sync abstraction
- volatile int mSyncTrigger; // Trigger that update thread can read & reset
+
+ Integration::GlSyncAbstraction* mGlSyncAbstraction; // The sync abstraction
Integration::GlSyncAbstraction::SyncObject* mSyncObject; // Associated sync object
+ volatile std::atomic<int> mSyncTrigger; // Trigger that update thread can read
+
};
-} // SceneGraph
+} // Render
+
} // Internal
+
} // Dali
-#endif // __DALI_INTERNAL_RENDER_TRACKER_H
+#endif // __DALI_INTERNAL_RENDER_RENDER_TRACKER_H