| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 virtual ~Logger() { } | 149 virtual ~Logger() { } |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 void setLoggerForTesting(PassOwnPtr<Logger>); | 152 void setLoggerForTesting(PassOwnPtr<Logger>); |
| 153 | 153 |
| 154 private: | 154 private: |
| 155 #if USE_IOSURFACE_FOR_2D_CANVAS | 155 #if USE_IOSURFACE_FOR_2D_CANVAS |
| 156 // All information associated with a CHROMIUM image. | 156 // All information associated with a CHROMIUM image. |
| 157 struct ImageInfo { | 157 struct ImageInfo { |
| 158 ImageInfo() {} | 158 ImageInfo() {} |
| 159 ImageInfo(GLuint imageId, GLuint textureId); | 159 ImageInfo(GLuint imageId, GLuint textureId, GLint gpuMemoryBufferId); |
| 160 | 160 |
| 161 // Whether this structure holds references to a CHROMIUM image. | 161 // Whether this structure holds references to a CHROMIUM image. |
| 162 bool empty(); | 162 bool empty(); |
| 163 | 163 |
| 164 // The id of the CHROMIUM image. | 164 // The id of the CHROMIUM image. |
| 165 GLuint m_imageId = 0; | 165 GLuint m_imageId = 0; |
| 166 | 166 |
| 167 // The id of the texture bound to the CHROMIUM image. | 167 // The id of the texture bound to the CHROMIUM image. |
| 168 GLuint m_textureId = 0; | 168 GLuint m_textureId = 0; |
| 169 |
| 170 // The id of the GpuMemoryBuffer backing the texture and CHROMIUM image. |
| 171 GLint m_gpuMemoryBufferId = -1; |
| 169 }; | 172 }; |
| 170 #endif // USE_IOSURFACE_FOR_2D_CANVAS | 173 #endif // USE_IOSURFACE_FOR_2D_CANVAS |
| 171 | 174 |
| 172 struct MailboxInfo { | 175 struct MailboxInfo { |
| 173 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 176 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 174 WebExternalTextureMailbox m_mailbox; | 177 WebExternalTextureMailbox m_mailbox; |
| 175 RefPtr<SkImage> m_image; | 178 RefPtr<SkImage> m_image; |
| 176 RefPtr<Canvas2DLayerBridge> m_parentLayerBridge; | 179 RefPtr<Canvas2DLayerBridge> m_parentLayerBridge; |
| 177 | 180 |
| 178 #if USE_IOSURFACE_FOR_2D_CANVAS | 181 #if USE_IOSURFACE_FOR_2D_CANVAS |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // Each element in this vector represents an IOSurface backed texture that | 280 // Each element in this vector represents an IOSurface backed texture that |
| 278 // is ready to be reused. | 281 // is ready to be reused. |
| 279 // Elements in this vector can safely be purged in low memory conditions. | 282 // Elements in this vector can safely be purged in low memory conditions. |
| 280 Vector<ImageInfo> m_imageInfoCache; | 283 Vector<ImageInfo> m_imageInfoCache; |
| 281 #endif // USE_IOSURFACE_FOR_2D_CANVAS | 284 #endif // USE_IOSURFACE_FOR_2D_CANVAS |
| 282 }; | 285 }; |
| 283 | 286 |
| 284 } // namespace blink | 287 } // namespace blink |
| 285 | 288 |
| 286 #endif | 289 #endif |
| OLD | NEW |