| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 if (!imageInfo) | 246 if (!imageInfo) |
| 247 return false; | 247 return false; |
| 248 | 248 |
| 249 gpu::gles2::GLES2Interface* gl = contextGL(); | 249 gpu::gles2::GLES2Interface* gl = contextGL(); |
| 250 if (!gl) | 250 if (!gl) |
| 251 return false; | 251 return false; |
| 252 | 252 |
| 253 GLuint imageTexture = | 253 GLuint imageTexture = |
| 254 skia::GrBackendObjectToGrGLTextureInfo(image->getTextureHandle(true)) | 254 skia::GrBackendObjectToGrGLTextureInfo(image->getTextureHandle(true)) |
| 255 ->fID; | 255 ->fID; |
| 256 gl->CopySubTextureCHROMIUM(imageTexture, 0, imageInfo->m_textureId, 0, 0, 0, | 256 GLenum textureTarget = GC3D_TEXTURE_RECTANGLE_ARB; |
| 257 0, 0, m_size.width(), m_size.height(), GL_FALSE, | 257 gl->CopySubTextureCHROMIUM( |
| 258 GL_FALSE, GL_FALSE); | 258 imageTexture, 0, textureTarget, imageInfo->m_textureId, 0, 0, 0, 0, 0, |
| 259 m_size.width(), m_size.height(), GL_FALSE, GL_FALSE, GL_FALSE); |
| 259 | 260 |
| 260 MailboxInfo& info = m_mailboxes.first(); | 261 MailboxInfo& info = m_mailboxes.first(); |
| 261 uint32_t textureTarget = GC3D_TEXTURE_RECTANGLE_ARB; | |
| 262 gpu::Mailbox mailbox; | 262 gpu::Mailbox mailbox; |
| 263 gl->GenMailboxCHROMIUM(mailbox.name); | 263 gl->GenMailboxCHROMIUM(mailbox.name); |
| 264 gl->ProduceTextureDirectCHROMIUM(imageInfo->m_textureId, textureTarget, | 264 gl->ProduceTextureDirectCHROMIUM(imageInfo->m_textureId, textureTarget, |
| 265 mailbox.name); | 265 mailbox.name); |
| 266 | 266 |
| 267 const GLuint64 fenceSync = gl->InsertFenceSyncCHROMIUM(); | 267 const GLuint64 fenceSync = gl->InsertFenceSyncCHROMIUM(); |
| 268 gl->Flush(); | 268 gl->Flush(); |
| 269 gpu::SyncToken syncToken; | 269 gpu::SyncToken syncToken; |
| 270 gl->GenSyncTokenCHROMIUM(fenceSync, syncToken.GetData()); | 270 gl->GenSyncTokenCHROMIUM(fenceSync, syncToken.GetData()); |
| 271 | 271 |
| (...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 default; | 1149 default; |
| 1150 | 1150 |
| 1151 void Canvas2DLayerBridge::Logger::reportHibernationEvent( | 1151 void Canvas2DLayerBridge::Logger::reportHibernationEvent( |
| 1152 HibernationEvent event) { | 1152 HibernationEvent event) { |
| 1153 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, | 1153 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, |
| 1154 ("Canvas.HibernationEvents", HibernationEventCount)); | 1154 ("Canvas.HibernationEvents", HibernationEventCount)); |
| 1155 hibernationHistogram.count(event); | 1155 hibernationHistogram.count(event); |
| 1156 } | 1156 } |
| 1157 | 1157 |
| 1158 } // namespace blink | 1158 } // namespace blink |
| OLD | NEW |