| 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 // there is no need for animations to be double buffered. | 426 // there is no need for animations to be double buffered. |
| 427 mailboxInfo.m_image.reset(); | 427 mailboxInfo.m_image.reset(); |
| 428 } else { | 428 } else { |
| 429 // FIXME: We'd rather insert a syncpoint than perform a flush here, | 429 // FIXME: We'd rather insert a syncpoint than perform a flush here, |
| 430 // but currently the canvas will flicker if we don't flush here. | 430 // but currently the canvas will flicker if we don't flush here. |
| 431 const GLuint64 fenceSync = gl->InsertFenceSyncCHROMIUM(); | 431 const GLuint64 fenceSync = gl->InsertFenceSyncCHROMIUM(); |
| 432 gl->Flush(); | 432 gl->Flush(); |
| 433 gl->GenSyncTokenCHROMIUM(fenceSync, syncToken.GetData()); | 433 gl->GenSyncTokenCHROMIUM(fenceSync, syncToken.GetData()); |
| 434 } | 434 } |
| 435 mailboxInfo.m_mailbox = mailbox; | 435 mailboxInfo.m_mailbox = mailbox; |
| 436 *outMailbox = cc::TextureMailbox(mailbox, syncToken, GL_TEXTURE_2D); | 436 bool isOverlayCandidate = false; |
| 437 bool secureOutputOnly = false; |
| 438 *outMailbox = cc::TextureMailbox(mailbox, syncToken, GL_TEXTURE_2D, m_size, |
| 439 isOverlayCandidate, secureOutputOnly); |
| 437 | 440 |
| 438 gl->BindTexture(GL_TEXTURE_2D, 0); | 441 gl->BindTexture(GL_TEXTURE_2D, 0); |
| 439 // Because we are changing the texture binding without going through skia, | 442 // Because we are changing the texture binding without going through skia, |
| 440 // we must dirty the context. | 443 // we must dirty the context. |
| 441 grContext->resetContext(kTextureBinding_GrGLBackendState); | 444 grContext->resetContext(kTextureBinding_GrGLBackendState); |
| 442 return true; | 445 return true; |
| 443 } | 446 } |
| 444 | 447 |
| 445 void Canvas2DLayerBridge::resetSkiaTextureBinding() { | 448 void Canvas2DLayerBridge::resetSkiaTextureBinding() { |
| 446 GrContext* grContext = m_contextProvider->grContext(); | 449 GrContext* grContext = m_contextProvider->grContext(); |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 default; | 1144 default; |
| 1142 | 1145 |
| 1143 void Canvas2DLayerBridge::Logger::reportHibernationEvent( | 1146 void Canvas2DLayerBridge::Logger::reportHibernationEvent( |
| 1144 HibernationEvent event) { | 1147 HibernationEvent event) { |
| 1145 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, | 1148 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, |
| 1146 ("Canvas.HibernationEvents", HibernationEventCount)); | 1149 ("Canvas.HibernationEvents", HibernationEventCount)); |
| 1147 hibernationHistogram.count(event); | 1150 hibernationHistogram.count(event); |
| 1148 } | 1151 } |
| 1149 | 1152 |
| 1150 } // namespace blink | 1153 } // namespace blink |
| OLD | NEW |