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

Unified Diff: cc/output/copy_output_result.h

Issue 23648014: cc: Move TextureMailbox::ReleaseCallback to SingleReleaseCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: releasecallback: SingleReleaseCallback 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/copy_output_request.cc ('k') | cc/output/copy_output_result.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/copy_output_result.h
diff --git a/cc/output/copy_output_result.h b/cc/output/copy_output_result.h
index 04cf2c6d489bbd60595d8f8481e18ba3b9caa070..c2f011d20fc41aaeeeff2594634c5447656038ee 100644
--- a/cc/output/copy_output_result.h
+++ b/cc/output/copy_output_result.h
@@ -7,11 +7,13 @@
#include "base/memory/scoped_ptr.h"
#include "cc/base/cc_export.h"
+#include "cc/resources/texture_mailbox.h"
#include "ui/gfx/size.h"
class SkBitmap;
namespace cc {
+class SingleReleaseCallback;
class TextureMailbox;
class CC_EXPORT CopyOutputResult {
@@ -25,29 +27,34 @@ class CC_EXPORT CopyOutputResult {
}
static scoped_ptr<CopyOutputResult> CreateTextureResult(
gfx::Size size,
- scoped_ptr<TextureMailbox> texture_mailbox) {
- return make_scoped_ptr(new CopyOutputResult(size, texture_mailbox.Pass()));
+ const TextureMailbox& texture_mailbox,
+ scoped_ptr<SingleReleaseCallback> release_callback) {
+ return make_scoped_ptr(
+ new CopyOutputResult(size, texture_mailbox, release_callback.Pass()));
}
~CopyOutputResult();
bool IsEmpty() const { return !HasBitmap() && !HasTexture(); }
bool HasBitmap() const { return !!bitmap_; }
- bool HasTexture() const { return !!texture_mailbox_; }
+ bool HasTexture() const { return texture_mailbox_.IsValid(); }
gfx::Size size() const { return size_; }
scoped_ptr<SkBitmap> TakeBitmap();
- scoped_ptr<TextureMailbox> TakeTexture();
+ void TakeTexture(TextureMailbox* texture_mailbox,
+ scoped_ptr<SingleReleaseCallback>* release_callback);
private:
CopyOutputResult();
explicit CopyOutputResult(scoped_ptr<SkBitmap> bitmap);
explicit CopyOutputResult(gfx::Size size,
- scoped_ptr<TextureMailbox> texture_mailbox);
+ const TextureMailbox& texture_mailbox,
+ scoped_ptr<SingleReleaseCallback> release_callback);
gfx::Size size_;
scoped_ptr<SkBitmap> bitmap_;
- scoped_ptr<TextureMailbox> texture_mailbox_;
+ TextureMailbox texture_mailbox_;
+ scoped_ptr<SingleReleaseCallback> release_callback_;
};
} // namespace cc
« no previous file with comments | « cc/output/copy_output_request.cc ('k') | cc/output/copy_output_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698