Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 friend class MailboxManagerSync; | 60 friend class MailboxManagerSync; |
| 61 friend class MailboxManagerImpl; | 61 friend class MailboxManagerImpl; |
| 62 | 62 |
| 63 void SetMailboxManager(MailboxManager* mailbox_manager); | 63 void SetMailboxManager(MailboxManager* mailbox_manager); |
| 64 | 64 |
| 65 MailboxManager* mailbox_manager_; | 65 MailboxManager* mailbox_manager_; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 // A ref-counted version of the TextureBase class that deletes the texture after | |
| 69 // all references have been released. | |
| 70 class TexturePassthrough final : public TextureBase, | |
| 71 public base::RefCounted<TexturePassthrough> { | |
| 72 public: | |
| 73 TexturePassthrough(GLuint service_id); | |
|
Zhenyao Mo
2016/09/09 21:22:11
explicit
Geoff Lang
2016/09/12 14:21:29
Done.
| |
| 74 | |
| 75 protected: | |
| 76 ~TexturePassthrough() override; | |
| 77 | |
| 78 private: | |
| 79 friend class base::RefCounted<TexturePassthrough>; | |
| 80 | |
| 81 DISALLOW_COPY_AND_ASSIGN(TexturePassthrough); | |
| 82 }; | |
| 83 | |
| 68 // Info about Textures currently in the system. | 84 // Info about Textures currently in the system. |
| 69 // This class wraps a real GL texture, keeping track of its meta-data. It is | 85 // This class wraps a real GL texture, keeping track of its meta-data. It is |
| 70 // jointly owned by possibly multiple TextureRef. | 86 // jointly owned by possibly multiple TextureRef. |
| 71 class GPU_EXPORT Texture final : public TextureBase { | 87 class GPU_EXPORT Texture final : public TextureBase { |
| 72 public: | 88 public: |
| 73 enum ImageState { | 89 enum ImageState { |
| 74 // If an image is associated with the texture and image state is UNBOUND, | 90 // If an image is associated with the texture and image state is UNBOUND, |
| 75 // then sampling out of the texture or using it as a target for drawing | 91 // then sampling out of the texture or using it as a target for drawing |
| 76 // will not read/write from/to the image. | 92 // will not read/write from/to the image. |
| 77 UNBOUND, | 93 UNBOUND, |
| (...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1206 private: | 1222 private: |
| 1207 DecoderTextureState* texture_state_; | 1223 DecoderTextureState* texture_state_; |
| 1208 base::TimeTicks begin_time_; | 1224 base::TimeTicks begin_time_; |
| 1209 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); | 1225 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); |
| 1210 }; | 1226 }; |
| 1211 | 1227 |
| 1212 } // namespace gles2 | 1228 } // namespace gles2 |
| 1213 } // namespace gpu | 1229 } // namespace gpu |
| 1214 | 1230 |
| 1215 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 1231 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
| OLD | NEW |