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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 gpu::gles2::GLES2Interface* gl = contextGL(); | 220 gpu::gles2::GLES2Interface* gl = contextGL(); |
221 GLuint imageTexture = skia::GrBackendObjectToGrGLTextureInfo(image->getTextu
reHandle(true))->fID; | 221 GLuint imageTexture = skia::GrBackendObjectToGrGLTextureInfo(image->getTextu
reHandle(true))->fID; |
222 gl->CopySubTextureCHROMIUM(imageTexture, imageInfo.m_textureId, 0, 0, 0, 0,
m_size.width(), m_size.height(), GL_FALSE, GL_FALSE, GL_FALSE); | 222 gl->CopySubTextureCHROMIUM(imageTexture, imageInfo.m_textureId, 0, 0, 0, 0,
m_size.width(), m_size.height(), GL_FALSE, GL_FALSE, GL_FALSE); |
223 | 223 |
224 MailboxInfo& info = m_mailboxes.first(); | 224 MailboxInfo& info = m_mailboxes.first(); |
225 info.m_mailbox.textureTarget = GC3D_TEXTURE_RECTANGLE_ARB; | 225 info.m_mailbox.textureTarget = GC3D_TEXTURE_RECTANGLE_ARB; |
226 gl->GenMailboxCHROMIUM(info.m_mailbox.name); | 226 gl->GenMailboxCHROMIUM(info.m_mailbox.name); |
227 gl->ProduceTextureDirectCHROMIUM(imageInfo.m_textureId, info.m_mailbox.textu
reTarget, info.m_mailbox.name); | 227 gl->ProduceTextureDirectCHROMIUM(imageInfo.m_textureId, info.m_mailbox.textu
reTarget, info.m_mailbox.name); |
228 info.m_mailbox.allowOverlay = true; | 228 info.m_mailbox.allowOverlay = true; |
229 | 229 |
230 const WGC3Duint64 fenceSync = gl->InsertFenceSyncCHROMIUM(); | 230 const GLuint64 fenceSync = gl->InsertFenceSyncCHROMIUM(); |
231 gl->Flush(); | 231 gl->Flush(); |
232 gl->GenSyncTokenCHROMIUM(fenceSync, info.m_mailbox.syncToken); | 232 gl->GenSyncTokenCHROMIUM(fenceSync, info.m_mailbox.syncToken); |
233 info.m_mailbox.validSyncToken = true; | 233 info.m_mailbox.validSyncToken = true; |
234 | 234 |
235 info.m_imageInfo = imageInfo; | 235 info.m_imageInfo = imageInfo; |
236 *outMailbox = info.m_mailbox; | 236 *outMailbox = info.m_mailbox; |
237 | 237 |
238 gl->BindTexture(GC3D_TEXTURE_RECTANGLE_ARB, 0); | 238 gl->BindTexture(GC3D_TEXTURE_RECTANGLE_ARB, 0); |
239 | 239 |
240 // Because we are changing the texture binding without going through skia, | 240 // Because we are changing the texture binding without going through skia, |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 #endif // USE_IOSURFACE_FOR_2D_CANVAS | 1000 #endif // USE_IOSURFACE_FOR_2D_CANVAS |
1001 } | 1001 } |
1002 | 1002 |
1003 void Canvas2DLayerBridge::Logger::reportHibernationEvent(HibernationEvent event) | 1003 void Canvas2DLayerBridge::Logger::reportHibernationEvent(HibernationEvent event) |
1004 { | 1004 { |
1005 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, ("Canvas.Hib
ernationEvents", HibernationEventCount)); | 1005 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, ("Canvas.Hib
ernationEvents", HibernationEventCount)); |
1006 hibernationHistogram.count(event); | 1006 hibernationHistogram.count(event); |
1007 } | 1007 } |
1008 | 1008 |
1009 } // namespace blink | 1009 } // namespace blink |
OLD | NEW |