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

Side by Side Diff: cc/output/copy_output_request.cc

Issue 23648014: cc: Move TextureMailbox::ReleaseCallback to SingleReleaseCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: releasecallback: rebase Created 7 years, 3 months 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 | Annotate | Revision Log
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_request.h" 5 #include "cc/output/copy_output_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "cc/output/copy_output_result.h" 10 #include "cc/output/copy_output_result.h"
11 #include "cc/resources/scoped_release_callback.h"
11 #include "cc/resources/texture_mailbox.h" 12 #include "cc/resources/texture_mailbox.h"
12 #include "third_party/skia/include/core/SkBitmap.h" 13 #include "third_party/skia/include/core/SkBitmap.h"
13 14
14 namespace cc { 15 namespace cc {
15 16
16 CopyOutputRequest::CopyOutputRequest() {} 17 CopyOutputRequest::CopyOutputRequest() {}
17 18
18 CopyOutputRequest::CopyOutputRequest( 19 CopyOutputRequest::CopyOutputRequest(
19 bool force_bitmap_result, 20 bool force_bitmap_result,
20 const CopyOutputRequestCallback& result_callback) 21 const CopyOutputRequestCallback& result_callback)
(...skipping 12 matching lines...) Expand all
33 } 34 }
34 35
35 void CopyOutputRequest::SendEmptyResult() { 36 void CopyOutputRequest::SendEmptyResult() {
36 SendResult(CopyOutputResult::CreateEmptyResult().Pass()); 37 SendResult(CopyOutputResult::CreateEmptyResult().Pass());
37 } 38 }
38 39
39 void CopyOutputRequest::SendBitmapResult(scoped_ptr<SkBitmap> bitmap) { 40 void CopyOutputRequest::SendBitmapResult(scoped_ptr<SkBitmap> bitmap) {
40 SendResult(CopyOutputResult::CreateBitmapResult(bitmap.Pass()).Pass()); 41 SendResult(CopyOutputResult::CreateBitmapResult(bitmap.Pass()).Pass());
41 } 42 }
42 43
43 void CopyOutputRequest::SendTextureResult(gfx::Size size, 44 void CopyOutputRequest::SendTextureResult(
44 scoped_ptr<TextureMailbox> texture) { 45 gfx::Size size,
45 DCHECK(texture->IsTexture()); 46 const TextureMailbox& texture_mailbox,
46 SendResult(CopyOutputResult::CreateTextureResult(size, 47 scoped_ptr<ScopedReleaseCallback> release_callback) {
47 texture.Pass()).Pass()); 48 DCHECK(texture_mailbox.IsTexture());
49 SendResult(CopyOutputResult::CreateTextureResult(
50 size, texture_mailbox, release_callback.Pass()));
48 } 51 }
49 52
50 } // namespace cc 53 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698