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 bool isOverlayCandidate = false; | 436 *outMailbox = cc::TextureMailbox(mailbox, syncToken, GL_TEXTURE_2D); |
437 bool secureOutputOnly = false; | |
438 *outMailbox = cc::TextureMailbox(mailbox, syncToken, GL_TEXTURE_2D, m_size, | |
439 isOverlayCandidate, secureOutputOnly); | |
440 | 437 |
441 gl->BindTexture(GL_TEXTURE_2D, 0); | 438 gl->BindTexture(GL_TEXTURE_2D, 0); |
442 // Because we are changing the texture binding without going through skia, | 439 // Because we are changing the texture binding without going through skia, |
443 // we must dirty the context. | 440 // we must dirty the context. |
444 grContext->resetContext(kTextureBinding_GrGLBackendState); | 441 grContext->resetContext(kTextureBinding_GrGLBackendState); |
445 return true; | 442 return true; |
446 } | 443 } |
447 | 444 |
448 void Canvas2DLayerBridge::resetSkiaTextureBinding() { | 445 void Canvas2DLayerBridge::resetSkiaTextureBinding() { |
449 GrContext* grContext = m_contextProvider->grContext(); | 446 GrContext* grContext = m_contextProvider->grContext(); |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 default; | 1141 default; |
1145 | 1142 |
1146 void Canvas2DLayerBridge::Logger::reportHibernationEvent( | 1143 void Canvas2DLayerBridge::Logger::reportHibernationEvent( |
1147 HibernationEvent event) { | 1144 HibernationEvent event) { |
1148 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, | 1145 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, |
1149 ("Canvas.HibernationEvents", HibernationEventCount)); | 1146 ("Canvas.HibernationEvents", HibernationEventCount)); |
1150 hibernationHistogram.count(event); | 1147 hibernationHistogram.count(event); |
1151 } | 1148 } |
1152 | 1149 |
1153 } // namespace blink | 1150 } // namespace blink |
OLD | NEW |