| OLD | NEW |
| 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 "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 ~CopyOutputRequest(); | 40 ~CopyOutputRequest(); |
| 41 | 41 |
| 42 bool IsEmpty() const { return result_callback_.is_null(); } | 42 bool IsEmpty() const { return result_callback_.is_null(); } |
| 43 | 43 |
| 44 bool force_bitmap_result() const { return force_bitmap_result_; } | 44 bool force_bitmap_result() const { return force_bitmap_result_; } |
| 45 | 45 |
| 46 // By default copy requests copy the entire layer's subtree output. If an | 46 // By default copy requests copy the entire layer's subtree output. If an |
| 47 // area is given, then the intersection of this rect (in layer space) with | 47 // area is given, then the intersection of this rect (in layer space) with |
| 48 // the layer's subtree output will be returned. | 48 // the layer's subtree output will be returned. |
| 49 void set_area(gfx::Rect area) { | 49 void set_area(const gfx::Rect& area) { |
| 50 has_area_ = true; | 50 has_area_ = true; |
| 51 area_ = area; | 51 area_ = area; |
| 52 } | 52 } |
| 53 bool has_area() const { return has_area_; } | 53 bool has_area() const { return has_area_; } |
| 54 gfx::Rect area() const { return area_; } | 54 gfx::Rect area() const { return area_; } |
| 55 | 55 |
| 56 // By default copy requests create a new TextureMailbox to return contents | 56 // By default copy requests create a new TextureMailbox to return contents |
| 57 // in. This allows a client to provide a TextureMailbox, and the compositor | 57 // in. This allows a client to provide a TextureMailbox, and the compositor |
| 58 // will place the result inside the TextureMailbox. | 58 // will place the result inside the TextureMailbox. |
| 59 void SetTextureMailbox(const TextureMailbox& texture_mailbox); | 59 void SetTextureMailbox(const TextureMailbox& texture_mailbox); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 77 bool has_area_; | 77 bool has_area_; |
| 78 bool has_texture_mailbox_; | 78 bool has_texture_mailbox_; |
| 79 gfx::Rect area_; | 79 gfx::Rect area_; |
| 80 TextureMailbox texture_mailbox_; | 80 TextureMailbox texture_mailbox_; |
| 81 CopyOutputRequestCallback result_callback_; | 81 CopyOutputRequestCallback result_callback_; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace cc | 84 } // namespace cc |
| 85 | 85 |
| 86 #endif // CC_OUTPUT_COPY_OUTPUT_REQUEST_H_ | 86 #endif // CC_OUTPUT_COPY_OUTPUT_REQUEST_H_ |
| OLD | NEW |