Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(795)

Unified Diff: cc/layers/texture_layer.cc

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/texture_layer.h ('k') | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer.cc
diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc
index c9fb61b86a053b278e00d76eb04d32960a8dc3a2..5ddc8b66551da9486f304d7bb6497cf2bbd707c6 100644
--- a/cc/layers/texture_layer.cc
+++ b/cc/layers/texture_layer.cc
@@ -154,7 +154,8 @@ void TextureLayer::SetTextureMailbox(
mailbox, release_callback.Pass(), requires_commit, allow_mailbox_reuse);
}
-static void IgnoreReleaseCallback(uint32 sync_point, bool lost) {}
+static void IgnoreReleaseCallback(const gpu::SyncToken& sync_token, bool lost) {
+}
void TextureLayer::SetTextureMailboxWithoutReleaseCallback(
const TextureMailbox& mailbox) {
@@ -163,7 +164,7 @@ void TextureLayer::SetTextureMailboxWithoutReleaseCallback(
// multiple times for the same mailbox.
DCHECK(!mailbox.IsValid() || !holder_ref_ ||
!mailbox.Equals(holder_ref_->holder()->mailbox()) ||
- mailbox.sync_point() != holder_ref_->holder()->mailbox().sync_point());
+ mailbox.sync_token() != holder_ref_->holder()->mailbox().sync_token());
scoped_ptr<SingleReleaseCallback> release;
bool requires_commit = true;
bool allow_mailbox_reuse = true;
@@ -267,9 +268,8 @@ TextureLayer::TextureMailboxHolder::TextureMailboxHolder(
: internal_references_(0),
mailbox_(mailbox),
release_callback_(release_callback.Pass()),
- sync_point_(mailbox.sync_point()),
- is_lost_(false) {
-}
+ sync_token_(mailbox.sync_token()),
+ is_lost_(false) {}
TextureLayer::TextureMailboxHolder::~TextureMailboxHolder() {
DCHECK_EQ(0u, internal_references_);
@@ -283,10 +283,11 @@ TextureLayer::TextureMailboxHolder::Create(
new TextureMailboxHolder(mailbox, release_callback.Pass())));
}
-void TextureLayer::TextureMailboxHolder::Return(uint32 sync_point,
- bool is_lost) {
+void TextureLayer::TextureMailboxHolder::Return(
+ const gpu::SyncToken& sync_token,
+ bool is_lost) {
base::AutoLock lock(arguments_lock_);
- sync_point_ = sync_point;
+ sync_token_ = sync_token;
is_lost_ = is_lost;
}
@@ -307,17 +308,17 @@ void TextureLayer::TextureMailboxHolder::InternalAddRef() {
void TextureLayer::TextureMailboxHolder::InternalRelease() {
DCHECK(main_thread_checker_.CalledOnValidThread());
if (!--internal_references_) {
- release_callback_->Run(sync_point_, is_lost_);
+ release_callback_->Run(sync_token_, is_lost_);
mailbox_ = TextureMailbox();
release_callback_ = nullptr;
}
}
void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread(
- uint32 sync_point,
+ const gpu::SyncToken& sync_token,
bool is_lost,
BlockingTaskRunner* main_thread_task_runner) {
- Return(sync_point, is_lost);
+ Return(sync_token, is_lost);
main_thread_task_runner->PostTask(
FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this));
}
« no previous file with comments | « cc/layers/texture_layer.h ('k') | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698