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

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

Issue 1535833002: Delete CC. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-5
Patch Set: rebase Created 4 years, 11 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
« no previous file with comments | « cc/output/copy_output_result.h ('k') | cc/output/delegated_frame_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/output/copy_output_result.h"
6
7 #include "base/logging.h"
8 #include "cc/resources/texture_mailbox.h"
9 #include "third_party/skia/include/core/SkBitmap.h"
10
11 namespace cc {
12
13 CopyOutputResult::CopyOutputResult() {}
14
15 CopyOutputResult::CopyOutputResult(scoped_ptr<SkBitmap> bitmap)
16 : size_(bitmap->width(), bitmap->height()),
17 bitmap_(bitmap.Pass()) {
18 DCHECK(bitmap_);
19 }
20
21 CopyOutputResult::CopyOutputResult(
22 const gfx::Size& size,
23 const TextureMailbox& texture_mailbox,
24 scoped_ptr<SingleReleaseCallback> release_callback)
25 : size_(size),
26 texture_mailbox_(texture_mailbox),
27 release_callback_(release_callback.Pass()) {
28 DCHECK(texture_mailbox_.IsTexture());
29 }
30
31 CopyOutputResult::~CopyOutputResult() {
32 if (release_callback_)
33 release_callback_->Run(0, false);
34 }
35
36 scoped_ptr<SkBitmap> CopyOutputResult::TakeBitmap() {
37 return bitmap_.Pass();
38 }
39
40 void CopyOutputResult::TakeTexture(
41 TextureMailbox* texture_mailbox,
42 scoped_ptr<SingleReleaseCallback>* release_callback) {
43 *texture_mailbox = texture_mailbox_;
44 *release_callback = release_callback_.Pass();
45
46 texture_mailbox_ = TextureMailbox();
47 }
48
49 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/copy_output_result.h ('k') | cc/output/delegated_frame_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698