Bug 1337821 - the comment for snapshot event passing. r=nical DONTBUILD
authorJerryShih <hshih@mozilla.com>
Thu, 16 Feb 2017 11:32:34 +0800
changeset 373005 1bb227f80f1902b4d1a12208f1736df2ebb6926c
parent 373004 74bf6080eb3a4ac4d34c3304f2bb283e4df4c314
child 373006 b4009e50b55978abb88b62a0d3b25925752d68e9
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1337821
milestone54.0a1
Bug 1337821 - the comment for snapshot event passing. r=nical DONTBUILD MozReview-Commit-ID: 28tpzIwmV4R
gfx/webrender_bindings/WebRenderAPI.cpp
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -184,16 +184,20 @@ WebRenderAPI::Readback(gfx::IntSize size
             layers::SynchronousTask* mTask;
             gfx::IntSize mSize;
             uint8_t *mBuffer;
             uint32_t mBufferSize;
     };
 
     layers::SynchronousTask task("Readback");
     auto event = MakeUnique<Readback>(&task, size, buffer, buffer_size);
+    // This event will be passed from wr_backend thread to renderer thread. That
+    // implies that all frame data have been processed when the renderer runs this
+    // read-back event. Then, we could make sure this read-back event gets the
+    // latest result.
     RunOnRenderThread(Move(event));
 
     task.Wait();
 }
 
 void
 WebRenderAPI::SetRootPipeline(PipelineId aPipeline)
 {