diff options
author | dyen <dyen@chromium.org> | 2015-11-03 12:03:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-03 20:04:03 +0000 |
commit | cc16ed4d1e600f3d478bd00d8d315894a74d68bb (patch) | |
tree | bd2ca9893e7ce38921b7a664486d55931db35aeb /chromecast/renderer | |
parent | 55df5b2e04bc9ab96196b38a05a8dfb5f9701ca4 (diff) | |
download | chromium_src-cc16ed4d1e600f3d478bd00d8d315894a74d68bb.zip chromium_src-cc16ed4d1e600f3d478bd00d8d315894a74d68bb.tar.gz chromium_src-cc16ed4d1e600f3d478bd00d8d315894a74d68bb.tar.bz2 |
Modified old wait sync point functions to also accept new sync tokens.
In order to help with refactoring old sync points into new sync points,
glWaitSyncPointCHROMIUM() has been changed to accept both the old and
new sync points.
This CL only refactors all the ways we pass around sync points so in
theory shouldn't change any behavior. Once this lands we can then
incrementally change the sync point insertions to the new sync points.
R=piman@chromium.org
BUG=514815
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1427543002
Cr-Commit-Position: refs/heads/master@{#357595}
Diffstat (limited to 'chromecast/renderer')
-rw-r--r-- | chromecast/renderer/media/hole_frame_factory.cc | 6 | ||||
-rw-r--r-- | chromecast/renderer/media/hole_frame_factory.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/chromecast/renderer/media/hole_frame_factory.cc b/chromecast/renderer/media/hole_frame_factory.cc index cd905d2..62dad08 100644 --- a/chromecast/renderer/media/hole_frame_factory.cc +++ b/chromecast/renderer/media/hole_frame_factory.cc @@ -16,7 +16,7 @@ namespace media { HoleFrameFactory::HoleFrameFactory( ::media::GpuVideoAcceleratorFactories* gpu_factories) - : gpu_factories_(gpu_factories), texture_(0), image_id_(0), sync_point_(0) { + : gpu_factories_(gpu_factories), texture_(0), image_id_(0) { if (gpu_factories_) { scoped_ptr<::media::GpuVideoAcceleratorFactories::ScopedGLContextLock> lock( gpu_factories_->GetGLContextLock()); @@ -32,7 +32,7 @@ HoleFrameFactory::HoleFrameFactory( gl->GenMailboxCHROMIUM(mailbox_.name); gl->ProduceTextureDirectCHROMIUM(texture_, GL_TEXTURE_2D, mailbox_.name); - sync_point_ = gl->InsertSyncPointCHROMIUM(); + sync_token_ = gpu::SyncToken(gl->InsertSyncPointCHROMIUM()); } } @@ -55,7 +55,7 @@ scoped_refptr<::media::VideoFrame> HoleFrameFactory::CreateHoleFrame( scoped_refptr<::media::VideoFrame> frame = ::media::VideoFrame::WrapNativeTexture( ::media::PIXEL_FORMAT_XRGB, - gpu::MailboxHolder(mailbox_, GL_TEXTURE_2D, sync_point_), + gpu::MailboxHolder(mailbox_, sync_token_, GL_TEXTURE_2D), ::media::VideoFrame::ReleaseMailboxCB(), size, // coded_size gfx::Rect(size), // visible rect diff --git a/chromecast/renderer/media/hole_frame_factory.h b/chromecast/renderer/media/hole_frame_factory.h index 524f965..febeef73 100644 --- a/chromecast/renderer/media/hole_frame_factory.h +++ b/chromecast/renderer/media/hole_frame_factory.h @@ -9,6 +9,7 @@ #include "base/memory/ref_counted.h" #include "gpu/command_buffer/common/mailbox.h" +#include "gpu/command_buffer/common/sync_token.h" namespace gfx { class Size; @@ -36,9 +37,9 @@ class HoleFrameFactory { private: ::media::GpuVideoAcceleratorFactories* gpu_factories_; gpu::Mailbox mailbox_; + gpu::SyncToken sync_token_; GLuint texture_; GLuint image_id_; - GLuint sync_point_; DISALLOW_COPY_AND_ASSIGN(HoleFrameFactory); }; |