OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 virtual ~Logger() { } | 147 virtual ~Logger() { } |
148 }; | 148 }; |
149 | 149 |
150 void setLoggerForTesting(std::unique_ptr<Logger>); | 150 void setLoggerForTesting(std::unique_ptr<Logger>); |
151 | 151 |
152 private: | 152 private: |
153 #if USE_IOSURFACE_FOR_2D_CANVAS | 153 #if USE_IOSURFACE_FOR_2D_CANVAS |
154 // All information associated with a CHROMIUM image. | 154 // All information associated with a CHROMIUM image. |
155 struct ImageInfo { | 155 struct ImageInfo { |
156 ImageInfo() {} | 156 ImageInfo() {} |
157 ImageInfo(GLuint imageId, GLuint textureId, GLint gpuMemoryBufferId); | 157 ImageInfo(GLuint imageId, GLuint textureId); |
158 | 158 |
159 // Whether this structure holds references to a CHROMIUM image. | 159 // Whether this structure holds references to a CHROMIUM image. |
160 bool empty(); | 160 bool empty(); |
161 | 161 |
162 // The id of the CHROMIUM image. | 162 // The id of the CHROMIUM image. |
163 GLuint m_imageId = 0; | 163 GLuint m_imageId = 0; |
164 | 164 |
165 // The id of the texture bound to the CHROMIUM image. | 165 // The id of the texture bound to the CHROMIUM image. |
166 GLuint m_textureId = 0; | 166 GLuint m_textureId = 0; |
167 | |
168 // The id of the GpuMemoryBuffer backing the texture and CHROMIUM image. | |
169 GLint m_gpuMemoryBufferId = -1; | |
170 }; | 167 }; |
171 #endif // USE_IOSURFACE_FOR_2D_CANVAS | 168 #endif // USE_IOSURFACE_FOR_2D_CANVAS |
172 | 169 |
173 struct MailboxInfo { | 170 struct MailboxInfo { |
174 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 171 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
175 WebExternalTextureMailbox m_mailbox; | 172 WebExternalTextureMailbox m_mailbox; |
176 RefPtr<SkImage> m_image; | 173 RefPtr<SkImage> m_image; |
177 RefPtr<Canvas2DLayerBridge> m_parentLayerBridge; | 174 RefPtr<Canvas2DLayerBridge> m_parentLayerBridge; |
178 | 175 |
179 #if USE_IOSURFACE_FOR_2D_CANVAS | 176 #if USE_IOSURFACE_FOR_2D_CANVAS |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 // Each element in this vector represents an IOSurface backed texture that | 278 // Each element in this vector represents an IOSurface backed texture that |
282 // is ready to be reused. | 279 // is ready to be reused. |
283 // Elements in this vector can safely be purged in low memory conditions. | 280 // Elements in this vector can safely be purged in low memory conditions. |
284 Vector<ImageInfo> m_imageInfoCache; | 281 Vector<ImageInfo> m_imageInfoCache; |
285 #endif // USE_IOSURFACE_FOR_2D_CANVAS | 282 #endif // USE_IOSURFACE_FOR_2D_CANVAS |
286 }; | 283 }; |
287 | 284 |
288 } // namespace blink | 285 } // namespace blink |
289 | 286 |
290 #endif | 287 #endif |
OLD | NEW |