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

Side by Side Diff: cc/output/copy_output_result.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: Folded sync_point into sync_tokens 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/copy_output_result.h" 5 #include "cc/output/copy_output_result.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/resources/texture_mailbox.h" 8 #include "cc/resources/texture_mailbox.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 10
(...skipping 12 matching lines...) Expand all
23 const TextureMailbox& texture_mailbox, 23 const TextureMailbox& texture_mailbox,
24 scoped_ptr<SingleReleaseCallback> release_callback) 24 scoped_ptr<SingleReleaseCallback> release_callback)
25 : size_(size), 25 : size_(size),
26 texture_mailbox_(texture_mailbox), 26 texture_mailbox_(texture_mailbox),
27 release_callback_(release_callback.Pass()) { 27 release_callback_(release_callback.Pass()) {
28 DCHECK(texture_mailbox_.IsTexture()); 28 DCHECK(texture_mailbox_.IsTexture());
29 } 29 }
30 30
31 CopyOutputResult::~CopyOutputResult() { 31 CopyOutputResult::~CopyOutputResult() {
32 if (release_callback_) 32 if (release_callback_)
33 release_callback_->Run(0, false); 33 release_callback_->Run(gpu::SyncToken(), false);
34 } 34 }
35 35
36 scoped_ptr<SkBitmap> CopyOutputResult::TakeBitmap() { 36 scoped_ptr<SkBitmap> CopyOutputResult::TakeBitmap() {
37 return bitmap_.Pass(); 37 return bitmap_.Pass();
38 } 38 }
39 39
40 void CopyOutputResult::TakeTexture( 40 void CopyOutputResult::TakeTexture(
41 TextureMailbox* texture_mailbox, 41 TextureMailbox* texture_mailbox,
42 scoped_ptr<SingleReleaseCallback>* release_callback) { 42 scoped_ptr<SingleReleaseCallback>* release_callback) {
43 *texture_mailbox = texture_mailbox_; 43 *texture_mailbox = texture_mailbox_;
44 *release_callback = release_callback_.Pass(); 44 *release_callback = release_callback_.Pass();
45 45
46 texture_mailbox_ = TextureMailbox(); 46 texture_mailbox_ = TextureMailbox();
47 } 47 }
48 48
49 } // namespace cc 49 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698