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

Side by Side Diff: cc/resources/texture_mailbox.h

Issue 1678613002: Revert of Separate out resource mailbox creation and fix synchronization issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RESOURCES_TEXTURE_MAILBOX_H_ 5 #ifndef CC_RESOURCES_TEXTURE_MAILBOX_H_
6 #define CC_RESOURCES_TEXTURE_MAILBOX_H_ 6 #define CC_RESOURCES_TEXTURE_MAILBOX_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 21 matching lines...) Expand all
32 uint32_t target, 32 uint32_t target,
33 const gfx::Size& size_in_pixels, 33 const gfx::Size& size_in_pixels,
34 bool is_overlay_candidate); 34 bool is_overlay_candidate);
35 TextureMailbox(SharedBitmap* shared_bitmap, const gfx::Size& size_in_pixels); 35 TextureMailbox(SharedBitmap* shared_bitmap, const gfx::Size& size_in_pixels);
36 36
37 ~TextureMailbox(); 37 ~TextureMailbox();
38 38
39 bool IsValid() const { return IsTexture() || IsSharedMemory(); } 39 bool IsValid() const { return IsTexture() || IsSharedMemory(); }
40 bool IsTexture() const { return !mailbox_holder_.mailbox.IsZero(); } 40 bool IsTexture() const { return !mailbox_holder_.mailbox.IsZero(); }
41 bool IsSharedMemory() const { return shared_bitmap_ != NULL; } 41 bool IsSharedMemory() const { return shared_bitmap_ != NULL; }
42 bool HasSyncToken() const { return mailbox_holder_.sync_token.HasData(); }
43
44 int8_t* GetSyncTokenData() { return mailbox_holder_.sync_token.GetData(); }
45 42
46 bool Equals(const TextureMailbox&) const; 43 bool Equals(const TextureMailbox&) const;
47 44
48 const gpu::Mailbox& mailbox() const { return mailbox_holder_.mailbox; } 45 const gpu::Mailbox& mailbox() const { return mailbox_holder_.mailbox; }
49 const int8_t* name() const { return mailbox().name; } 46 const int8_t* name() const { return mailbox().name; }
50 uint32_t target() const { return mailbox_holder_.texture_target; } 47 uint32_t target() const { return mailbox_holder_.texture_target; }
51 const gpu::SyncToken& sync_token() const { 48 const gpu::SyncToken& sync_token() const {
52 return mailbox_holder_.sync_token; 49 return mailbox_holder_.sync_token;
53 } 50 }
54 void set_sync_token(const gpu::SyncToken& sync_token) { 51 void set_sync_token(const gpu::SyncToken& sync_token) {
(...skipping 16 matching lines...) Expand all
71 gpu::MailboxHolder mailbox_holder_; 68 gpu::MailboxHolder mailbox_holder_;
72 SharedBitmap* shared_bitmap_; 69 SharedBitmap* shared_bitmap_;
73 gfx::Size size_in_pixels_; 70 gfx::Size size_in_pixels_;
74 bool is_overlay_candidate_; 71 bool is_overlay_candidate_;
75 bool nearest_neighbor_; 72 bool nearest_neighbor_;
76 }; 73 };
77 74
78 } // namespace cc 75 } // namespace cc
79 76
80 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ 77 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_
OLDNEW
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698