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..16d0c0a901a8da12c20e03bde5214c7cb9238e19 100644 |
--- a/cc/resources/video_resource_updater.h |
+++ b/cc/resources/video_resource_updater.h |
@@ -99,6 +99,11 @@ 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) |
+ // This is marked true when the orginal VideoFrame is destructed. It is used |
+ // to detect the reuse of the destructed resource (in Debug mode only). |
miu
2016/03/09 01:59:49
Instead of "It is used to detect the reuse of the
xjz
2016/03/10 01:51:44
Done.
|
+ bool destructed; |
+#endif |
size_t plane_index; |
base::TimeDelta timestamp; |
@@ -144,6 +149,12 @@ class CC_EXPORT VideoResourceUpdater |
const gpu::SyncToken& sync_token, |
bool lost_resource, |
BlockingTaskRunner* main_thread_task_runner); |
+#if !defined(NDEBUG) |
+ // 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_; |