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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h

Issue 1974163003: Expose GpuMemoryBufferId through glGetImageivCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 6 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_command_buffer_proxy.cc ('k') | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698