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 #include "cc/resources/texture_mailbox.h" | 5 #include "cc/resources/texture_mailbox.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "cc/resources/shared_bitmap.h" | 11 #include "cc/resources/shared_bitmap.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 | 14 |
15 TextureMailbox::TextureMailbox() : shared_bitmap_(NULL) { | 15 TextureMailbox::TextureMailbox() : shared_bitmap_(NULL) { |
16 } | 16 } |
17 | 17 |
| 18 TextureMailbox::TextureMailbox(const TextureMailbox& other) = default; |
| 19 |
18 TextureMailbox::TextureMailbox(const gpu::MailboxHolder& mailbox_holder) | 20 TextureMailbox::TextureMailbox(const gpu::MailboxHolder& mailbox_holder) |
19 : mailbox_holder_(mailbox_holder), | 21 : mailbox_holder_(mailbox_holder), |
20 shared_bitmap_(NULL), | 22 shared_bitmap_(NULL), |
21 is_overlay_candidate_(false), | 23 is_overlay_candidate_(false), |
22 #if defined(OS_ANDROID) | 24 #if defined(OS_ANDROID) |
23 is_backed_by_surface_texture_(false), | 25 is_backed_by_surface_texture_(false), |
24 wants_promotion_hint_(false), | 26 wants_promotion_hint_(false), |
25 #endif | 27 #endif |
26 secure_output_only_(false), | 28 secure_output_only_(false), |
27 nearest_neighbor_(false) { | 29 nearest_neighbor_(false) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 return !IsValid(); | 93 return !IsValid(); |
92 } | 94 } |
93 | 95 |
94 size_t TextureMailbox::SharedMemorySizeInBytes() const { | 96 size_t TextureMailbox::SharedMemorySizeInBytes() const { |
95 // UncheckedSizeInBytes is okay because we VerifySizeInBytes in the | 97 // UncheckedSizeInBytes is okay because we VerifySizeInBytes in the |
96 // constructor and the field is immutable. | 98 // constructor and the field is immutable. |
97 return SharedBitmap::UncheckedSizeInBytes(size_in_pixels_); | 99 return SharedBitmap::UncheckedSizeInBytes(size_in_pixels_); |
98 } | 100 } |
99 | 101 |
100 } // namespace cc | 102 } // namespace cc |
OLD | NEW |