summaryrefslogtreecommitdiffstats
path: root/media/base/video_frame_unittest.cc
diff options
context:
space:
mode:
authornhiroki <nhiroki@chromium.org>2015-11-04 21:56:05 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-05 05:56:50 +0000
commita1ab22a90140fe9e6c669998f3efc52795e569e2 (patch)
tree98e158c1d36c83f57f9c9334dc600dc7468f3c4f /media/base/video_frame_unittest.cc
parent29a936f7a618bc15e90e1308eab78ffc9d5b6ce8 (diff)
downloadchromium_src-a1ab22a90140fe9e6c669998f3efc52795e569e2.zip
chromium_src-a1ab22a90140fe9e6c669998f3efc52795e569e2.tar.gz
chromium_src-a1ab22a90140fe9e6c669998f3efc52795e569e2.tar.bz2
Revert of Converted video frame and image callbacks to use new sync tokens. (patchset #9 id:160001 of https://codereview.chromium.org/1429213002/ )
Reason for revert: This could be breaking webkit_tests: http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20%28dbg%29/builds/4445 http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.7%20%28dbg%29/builds/25461 Original issue's description: > Converted video frame and image callbacks to use new sync tokens. > > As an incremental step towards utilizing the new sync tokens, this > CL converts existing video frame and image sync points to use > sync tokens instead. > > In order to accomplish this, the GpuCommandBufferMsg_CreateImage > IPC message has been modified to accept a fence_release parameter > so that it can act as a sync token IPC. > > A new SyncPointClientWaiter concept has also added which can wait > on other sync point clients without an associated order number. > This only works because the SyncPointClientWaiter cannot be waited > on so no deadlocks can occur. > > BUG=514815 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/c7aff68a0c11820cc2b8d488851c682c0d32cd2b > Cr-Commit-Position: refs/heads/master@{#357997} TBR=dcheng@chromium.org,dalecurtis@chromium.org,piman@chromium.org,sky@chromium.org,dyen@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=514815 Review URL: https://codereview.chromium.org/1414793018 Cr-Commit-Position: refs/heads/master@{#358008}
Diffstat (limited to 'media/base/video_frame_unittest.cc')
-rw-r--r--media/base/video_frame_unittest.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/media/base/video_frame_unittest.cc b/media/base/video_frame_unittest.cc
index ee2a454..c9f05ec 100644
--- a/media/base/video_frame_unittest.cc
+++ b/media/base/video_frame_unittest.cc
@@ -269,7 +269,7 @@ static void TextureCallback(gpu::SyncToken* called_sync_token,
// Verify the gpu::MailboxHolder::ReleaseCallback is called when VideoFrame is
// destroyed with the default release sync point.
TEST(VideoFrame, TextureNoLongerNeededCallbackIsCalled) {
- gpu::SyncToken called_sync_token(gpu::CommandBufferNamespace::GPU_IO, 1, 1);
+ gpu::SyncToken called_sync_token(1);
{
scoped_refptr<VideoFrame> frame = VideoFrame::WrapNativeTexture(
@@ -296,8 +296,8 @@ class SyncTokenClientImpl : public VideoFrame::SyncTokenClient {
explicit SyncTokenClientImpl(const gpu::SyncToken& sync_token)
: sync_token_(sync_token) {}
~SyncTokenClientImpl() override {}
- void GenerateSyncToken(gpu::SyncToken* sync_token) override {
- *sync_token = sync_token_;
+ uint32 InsertSyncPoint() override {
+ return static_cast<uint32>(sync_token_.release_count());
}
void WaitSyncToken(const gpu::SyncToken& sync_token) override {}
@@ -313,20 +313,14 @@ class SyncTokenClientImpl : public VideoFrame::SyncTokenClient {
TEST(VideoFrame,
TexturesNoLongerNeededCallbackAfterTakingAndReleasingMailboxes) {
const int kPlanesNum = 3;
- const gpu::CommandBufferNamespace kNamespace =
- gpu::CommandBufferNamespace::GPU_IO;
- const uint64_t kCommandBufferId = 0x123;
gpu::Mailbox mailbox[kPlanesNum];
for (int i = 0; i < kPlanesNum; ++i) {
mailbox[i].name[0] = 50 + 1;
}
- gpu::SyncToken sync_token(kNamespace, kCommandBufferId, 7);
- sync_token.SetVerifyFlush();
+ gpu::SyncToken sync_token(7);
uint32 target = 9;
- gpu::SyncToken release_sync_token(kNamespace, kCommandBufferId, 111);
- release_sync_token.SetVerifyFlush();
-
+ gpu::SyncToken release_sync_token(111);
gpu::SyncToken called_sync_token;
{
scoped_refptr<VideoFrame> frame = VideoFrame::WrapYUV420NativeTextures(