Chromium Code Reviews| Index: cc/output/copy_output_result.h |
| diff --git a/cc/output/copy_output_result.h b/cc/output/copy_output_result.h |
| index a64fc5108ef4cc46ce8cead0e9dfac49ea83bc84..0de5a0c93c9dcf47742a5c286d5de984bd04ff97 100644 |
| --- a/cc/output/copy_output_result.h |
| +++ b/cc/output/copy_output_result.h |
| @@ -11,11 +11,18 @@ |
| #include "cc/base/cc_export.h" |
| #include "cc/resources/single_release_callback.h" |
| #include "cc/resources/texture_mailbox.h" |
| +#include "mojo/public/cpp/bindings/struct_traits.h" |
| +#include "third_party/skia/include/core/SkBitmap.h" |
| #include "ui/gfx/geometry/size.h" |
| class SkBitmap; |
| namespace cc { |
| + |
| +namespace mojom { |
| +class CopyOutputResultDataView; |
| +} |
| + |
| class TextureMailbox; |
| class CC_EXPORT CopyOutputResult { |
| @@ -35,10 +42,13 @@ class CC_EXPORT CopyOutputResult { |
| std::move(release_callback))); |
| } |
| + CopyOutputResult(); |
| ~CopyOutputResult(); |
| + CopyOutputResult& operator=(CopyOutputResult&& other); |
|
vmpstr
2017/01/31 21:32:19
Should this come with a corresponding move ctor?
Saman Sami
2017/02/01 15:51:57
Done.
|
| + |
| bool IsEmpty() const { return !HasBitmap() && !HasTexture(); } |
| - bool HasBitmap() const { return !!bitmap_; } |
| + bool HasBitmap() const { return !!bitmap_ && !bitmap_->isNull(); } |
| bool HasTexture() const { return texture_mailbox_.IsValid(); } |
| gfx::Size size() const { return size_; } |
| @@ -47,7 +57,9 @@ class CC_EXPORT CopyOutputResult { |
| std::unique_ptr<SingleReleaseCallback>* release_callback); |
| private: |
| - CopyOutputResult(); |
| + friend struct mojo::StructTraits<mojom::CopyOutputResultDataView, |
| + CopyOutputResult>; |
| + |
| explicit CopyOutputResult(std::unique_ptr<SkBitmap> bitmap); |
| explicit CopyOutputResult( |
| const gfx::Size& size, |