1 #ifndef __DALI_INTERNAL_SYNC_RESOURCE_TRACKER_H__
2 #define __DALI_INTERNAL_SYNC_RESOURCE_TRACKER_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 #include <dali/internal/update/resources/resource-tracker.h>
27 class GlSyncAbstraction;
36 class RenderMessageDispatcher;
40 * Class to track completion of a resource.
41 * This class is designed to be used on resources that change completion in the render thread.
42 * Used by RenderTasks that render to a framebuffer backed by a native image, i.e. it
43 * needs GlFenceSync to determine when GL has written to the native image.
45 class SyncResourceTracker : public ResourceTracker
51 SyncResourceTracker( Integration::GlSyncAbstraction& glSyncAbstraction,
52 SceneGraph::RenderMessageDispatcher& renderMessageDispatcher);
57 virtual ~SyncResourceTracker();
60 * Second stage initialization.
61 * Creates a RenderTracker object to handle fence sync
63 virtual void Initialize();
66 * first stage destruction
67 * Called from CompleteStatusManager when the object is about to be deleted
69 virtual void OnDestroy();
72 * Get the render tracker.
73 * @return The render tracker
75 SceneGraph::RenderTracker* GetRenderTracker();
79 * Do the reset. Resets the RenderTracker
81 virtual void DoReset();
84 * Ignore complete status from update thread
86 virtual void DoSetComplete();
89 * Do the IsComplete. Allows derived types to perform their own handling
91 virtual bool DoIsComplete();
96 * Undefined Copy Constructor
98 SyncResourceTracker(const SyncResourceTracker& rhs);
101 * @brief Undefined Assignment Operator
103 SyncResourceTracker& operator=(const SyncResourceTracker& rhs);
106 Integration::GlSyncAbstraction& mGlSyncAbstraction; ///< The synchronisation interface
107 SceneGraph::RenderMessageDispatcher& mRenderMessageDispatcher; ///< RenderManager message dispatcher
108 SceneGraph::RenderTracker* mRenderTracker; ///< The GL Fence Sync tracker object
114 #endif // __DALI_INTERNAL_SYNC_RESOURCE_TRACKER_H__