Index: cc/resources/video_resource_updater.h |
diff --git a/cc/resources/video_resource_updater.h b/cc/resources/video_resource_updater.h |
index 1307be9e5416a4507b9d383581bc96f40ff40e98..fe655ca89207f8b038224970cea2b02167a1a4ce 100644 |
--- a/cc/resources/video_resource_updater.h |
+++ b/cc/resources/video_resource_updater.h |
@@ -99,6 +99,14 @@ class CC_EXPORT VideoResourceUpdater |
// frame pointer will only be used for pointer comparison, i.e. the |
// underlying data will not be accessed. |
const void* frame_ptr; |
+#if !defined(NDEBUG) |
danakj
2016/03/14 18:52:41
I think you mean #if DCHECK_IS_ON()
xjz
2016/03/15 21:04:00
Done.
|
+ // This is marked true when the orginal VideoFrame is destructed. It is |
+ // used to detect clients that are not setting the VideoFrame's timestamp |
+ // field correctly, as required. The memory allocator can and will re-use |
+ // the same pointer for new VideoFrame instances, so a destruction observer |
+ // is used to detect that. |
+ bool destructed; |
+#endif |
size_t plane_index; |
base::TimeDelta timestamp; |
@@ -144,6 +152,12 @@ class CC_EXPORT VideoResourceUpdater |
const gpu::SyncToken& sync_token, |
bool lost_resource, |
BlockingTaskRunner* main_thread_task_runner); |
+#if !defined(NDEBUG) |
danakj
2016/03/14 18:52:41
for all these
xjz
2016/03/15 21:04:00
Done.
|
+ // Mark the |destructed| as true when the orginal VideoFrame is destructed. |
+ static void MarkOldResource(base::WeakPtr<VideoResourceUpdater> updater, |
+ const void* video_frame_ptr, |
+ base::TimeDelta timestamp); |
+#endif |
ContextProvider* context_provider_; |
ResourceProvider* resource_provider_; |