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

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

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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/skpicture_content_layer_updater.cc ('k') | cc/resources/texture_mailbox.cc » ('j') | 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 <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 TextureMailbox(); 22 TextureMailbox();
23 explicit TextureMailbox(const std::string& mailbox_name); 23 explicit TextureMailbox(const std::string& mailbox_name);
24 explicit TextureMailbox(const gpu::Mailbox& mailbox_name); 24 explicit TextureMailbox(const gpu::Mailbox& mailbox_name);
25 TextureMailbox(const gpu::Mailbox& mailbox_name, 25 TextureMailbox(const gpu::Mailbox& mailbox_name,
26 unsigned sync_point); 26 unsigned sync_point);
27 TextureMailbox(const gpu::Mailbox& mailbox_name, 27 TextureMailbox(const gpu::Mailbox& mailbox_name,
28 unsigned texture_target, 28 unsigned texture_target,
29 unsigned sync_point); 29 unsigned sync_point);
30 TextureMailbox(base::SharedMemory* shared_memory, 30 TextureMailbox(base::SharedMemory* shared_memory,
31 gfx::Size size); 31 const gfx::Size& size);
32 32
33 ~TextureMailbox(); 33 ~TextureMailbox();
34 34
35 bool IsValid() const { return IsTexture() || IsSharedMemory(); } 35 bool IsValid() const { return IsTexture() || IsSharedMemory(); }
36 bool IsTexture() const { return !name_.IsZero(); } 36 bool IsTexture() const { return !name_.IsZero(); }
37 bool IsSharedMemory() const { return shared_memory_ != NULL; } 37 bool IsSharedMemory() const { return shared_memory_ != NULL; }
38 38
39 bool Equals(const TextureMailbox&) const; 39 bool Equals(const TextureMailbox&) const;
40 bool ContainsMailbox(const gpu::Mailbox&) const; 40 bool ContainsMailbox(const gpu::Mailbox&) const;
41 bool ContainsHandle(base::SharedMemoryHandle handle) const; 41 bool ContainsHandle(base::SharedMemoryHandle handle) const;
(...skipping 16 matching lines...) Expand all
58 gpu::Mailbox name_; 58 gpu::Mailbox name_;
59 unsigned target_; 59 unsigned target_;
60 unsigned sync_point_; 60 unsigned sync_point_;
61 base::SharedMemory* shared_memory_; 61 base::SharedMemory* shared_memory_;
62 gfx::Size shared_memory_size_; 62 gfx::Size shared_memory_size_;
63 }; 63 };
64 64
65 } // namespace cc 65 } // namespace cc
66 66
67 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ 67 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_
OLDNEW
« no previous file with comments | « cc/resources/skpicture_content_layer_updater.cc ('k') | cc/resources/texture_mailbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698