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