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