OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 } | 254 } |
255 if (!m_recycledBitmapQueue.isEmpty()) { | 255 if (!m_recycledBitmapQueue.isEmpty()) { |
256 RecycledBitmap recycled = m_recycledBitmapQueue.takeLast(); | 256 RecycledBitmap recycled = m_recycledBitmapQueue.takeLast(); |
257 DCHECK(recycled.size == m_size); | 257 DCHECK(recycled.size == m_size); |
258 return std::move(recycled.bitmap); | 258 return std::move(recycled.bitmap); |
259 } | 259 } |
260 | 260 |
261 return Platform::current()->allocateSharedBitmap(m_size); | 261 return Platform::current()->allocateSharedBitmap(m_size); |
262 } | 262 } |
263 | 263 |
264 bool DrawingBuffer::PrepareTextureMailbox(cc::TextureMailbox* outMailbox, | 264 bool DrawingBuffer::PrepareTextureMailbox(cc::TextureMailbox* outMailbox, std::u
nique_ptr<cc::SingleReleaseCallback>* outReleaseCallback) |
265 std::unique_ptr<cc::SingleReleaseCallback>* outReleaseCallback, | |
266 bool useSharedMemory) | |
267 { | 265 { |
268 bool forceGpuResult = false; | 266 bool forceGpuResult = false; |
269 return prepareTextureMailboxInternal(outMailbox, outReleaseCallback, forceGp
uResult); | 267 return prepareTextureMailboxInternal(outMailbox, outReleaseCallback, forceGp
uResult); |
270 } | 268 } |
271 | 269 |
272 bool DrawingBuffer::prepareTextureMailboxInternal( | 270 bool DrawingBuffer::prepareTextureMailboxInternal( |
273 cc::TextureMailbox* outMailbox, | 271 cc::TextureMailbox* outMailbox, |
274 std::unique_ptr<cc::SingleReleaseCallback>* outReleaseCallback, | 272 std::unique_ptr<cc::SingleReleaseCallback>* outReleaseCallback, |
275 bool forceGpuResult) | 273 bool forceGpuResult) |
276 { | 274 { |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 | 1228 |
1231 void DrawingBuffer::restoreTextureBindings() | 1229 void DrawingBuffer::restoreTextureBindings() |
1232 { | 1230 { |
1233 // This class potentially modifies the bindings for GL_TEXTURE_2D and | 1231 // This class potentially modifies the bindings for GL_TEXTURE_2D and |
1234 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since | 1232 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since |
1235 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. | 1233 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. |
1236 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); | 1234 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); |
1237 } | 1235 } |
1238 | 1236 |
1239 } // namespace blink | 1237 } // namespace blink |
OLD | NEW |