Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 | 247 |
| 248 gl->DeleteTextures(1, &sourceTexture); | 248 gl->DeleteTextures(1, &sourceTexture); |
| 249 | 249 |
| 250 const GLuint64 contextFenceSync = gl->InsertFenceSyncCHROMIUM(); | 250 const GLuint64 contextFenceSync = gl->InsertFenceSyncCHROMIUM(); |
| 251 | 251 |
| 252 gl->Flush(); | 252 gl->Flush(); |
| 253 | 253 |
| 254 GLbyte syncToken[24]; | 254 GLbyte syncToken[24]; |
| 255 gl->GenSyncTokenCHROMIUM(contextFenceSync, syncToken); | 255 gl->GenSyncTokenCHROMIUM(contextFenceSync, syncToken); |
| 256 sharedGL->WaitSyncTokenCHROMIUM(syncToken); | 256 sharedGL->WaitSyncTokenCHROMIUM(syncToken); |
| 257 sharedGL->ProduceTextureDirectCHROMIUM(0, textureInfo->fTarget, mailbox->nam e); | |
|
Ken Russell (switch to Gerrit)
2016/08/05 00:56:52
Please add a comment that this disassociates the t
| |
| 257 | 258 |
| 258 // Undo grContext texture binding changes introduced in this function | 259 // Undo grContext texture binding changes introduced in this function |
| 259 provider->grContext()->resetContext(kTextureBinding_GrGLBackendState); | 260 provider->grContext()->resetContext(kTextureBinding_GrGLBackendState); |
| 260 | 261 |
| 261 return true; | 262 return true; |
| 262 } | 263 } |
| 263 | 264 |
| 264 bool ImageBuffer::copyRenderingResultsFromDrawingBuffer(DrawingBuffer* drawingBu ffer, SourceDrawingBuffer sourceBuffer) | 265 bool ImageBuffer::copyRenderingResultsFromDrawingBuffer(DrawingBuffer* drawingBu ffer, SourceDrawingBuffer sourceBuffer) |
| 265 { | 266 { |
| 266 if (!drawingBuffer || !m_surface->isAccelerated()) | 267 if (!drawingBuffer || !m_surface->isAccelerated()) |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 461 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)); | 462 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)); |
| 462 | 463 |
| 463 Vector<unsigned char> result; | 464 Vector<unsigned char> result; |
| 464 if (!encodeImage(mimeType, quality, &result)) | 465 if (!encodeImage(mimeType, quality, &result)) |
| 465 return "data:,"; | 466 return "data:,"; |
| 466 | 467 |
| 467 return "data:" + mimeType + ";base64," + base64Encode(result); | 468 return "data:" + mimeType + ";base64," + base64Encode(result); |
| 468 } | 469 } |
| 469 | 470 |
| 470 } // namespace blink | 471 } // namespace blink |
| OLD | NEW |