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

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

Issue 2676353002: MojoCompositorFrameSinkPrivate should support copy requests (Closed)
Patch Set: c Created 3 years, 10 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
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 #ifndef CC_OUTPUT_COPY_OUTPUT_REQUEST_H_ 5 #ifndef CC_OUTPUT_COPY_OUTPUT_REQUEST_H_
6 #define CC_OUTPUT_COPY_OUTPUT_REQUEST_H_ 6 #define CC_OUTPUT_COPY_OUTPUT_REQUEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 void SendEmptyResult(); 77 void SendEmptyResult();
78 void SendBitmapResult(std::unique_ptr<SkBitmap> bitmap); 78 void SendBitmapResult(std::unique_ptr<SkBitmap> bitmap);
79 void SendTextureResult( 79 void SendTextureResult(
80 const gfx::Size& size, 80 const gfx::Size& size,
81 const TextureMailbox& texture_mailbox, 81 const TextureMailbox& texture_mailbox,
82 std::unique_ptr<SingleReleaseCallback> release_callback); 82 std::unique_ptr<SingleReleaseCallback> release_callback);
83 83
84 void SendResult(std::unique_ptr<CopyOutputResult> result); 84 void SendResult(std::unique_ptr<CopyOutputResult> result);
85 85
86 void set_result_callback(CopyOutputRequestCallback result_callback) {
danakj 2017/02/06 23:02:12 This looks like what CreateRelayRequest is for, to
Saman Sami 2017/02/06 23:09:54 Yeah, you're right. I can fix that, but do we have
danakj 2017/02/06 23:24:08 It's not a copy of much, what are you concerned fo
Saman Sami 2017/02/13 23:07:37 Pretty much every private member has a setter thou
danakj 2017/02/13 23:11:15 Yes but this the thing that ensures the callback i
danakj 2017/02/13 23:12:19 This along with the fact there is already a way to
87 result_callback_ = result_callback;
88 }
89
90 const CopyOutputRequestCallback& result_callback() {
91 return result_callback_;
92 }
93
86 private: 94 private:
87 friend struct mojo::StructTraits<mojom::CopyOutputRequestDataView, 95 friend struct mojo::StructTraits<mojom::CopyOutputRequestDataView,
88 std::unique_ptr<CopyOutputRequest>>; 96 std::unique_ptr<CopyOutputRequest>>;
89 97
90 CopyOutputRequest(); 98 CopyOutputRequest();
91 CopyOutputRequest(bool force_bitmap_result, 99 CopyOutputRequest(bool force_bitmap_result,
92 const CopyOutputRequestCallback& result_callback); 100 const CopyOutputRequestCallback& result_callback);
93 101
94 base::Optional<base::UnguessableToken> source_; 102 base::Optional<base::UnguessableToken> source_;
95 bool force_bitmap_result_; 103 bool force_bitmap_result_;
96 base::Optional<gfx::Rect> area_; 104 base::Optional<gfx::Rect> area_;
97 base::Optional<TextureMailbox> texture_mailbox_; 105 base::Optional<TextureMailbox> texture_mailbox_;
98 CopyOutputRequestCallback result_callback_; 106 CopyOutputRequestCallback result_callback_;
99 107
100 DISALLOW_COPY_AND_ASSIGN(CopyOutputRequest); 108 DISALLOW_COPY_AND_ASSIGN(CopyOutputRequest);
101 }; 109 };
102 110
103 } // namespace cc 111 } // namespace cc
104 112
105 #endif // CC_OUTPUT_COPY_OUTPUT_REQUEST_H_ 113 #endif // CC_OUTPUT_COPY_OUTPUT_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698