| 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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 | 943 |
| 944 void Canvas2DLayerBridge::mailboxReleased(const gpu::Mailbox& mailbox, | 944 void Canvas2DLayerBridge::mailboxReleased(const gpu::Mailbox& mailbox, |
| 945 const gpu::SyncToken& syncToken, | 945 const gpu::SyncToken& syncToken, |
| 946 bool lostResource) { | 946 bool lostResource) { |
| 947 DCHECK(isAccelerated() || isHibernating()); | 947 DCHECK(isAccelerated() || isHibernating()); |
| 948 bool contextLost = | 948 bool contextLost = |
| 949 !isHibernating() && | 949 !isHibernating() && |
| 950 (!m_surface || | 950 (!m_surface || |
| 951 m_contextProvider->contextGL()->GetGraphicsResetStatusKHR() != | 951 m_contextProvider->contextGL()->GetGraphicsResetStatusKHR() != |
| 952 GL_NO_ERROR); | 952 GL_NO_ERROR); |
| 953 DCHECK(m_mailboxes.last().m_parentLayerBridge.get() == this); | 953 DCHECK(m_mailboxes.back().m_parentLayerBridge.get() == this); |
| 954 | 954 |
| 955 // Mailboxes are typically released in FIFO order, so we iterate | 955 // Mailboxes are typically released in FIFO order, so we iterate |
| 956 // from the end of m_mailboxes. | 956 // from the end of m_mailboxes. |
| 957 auto releasedMailboxInfo = m_mailboxes.end(); | 957 auto releasedMailboxInfo = m_mailboxes.end(); |
| 958 auto firstMailbox = m_mailboxes.begin(); | 958 auto firstMailbox = m_mailboxes.begin(); |
| 959 | 959 |
| 960 while (true) { | 960 while (true) { |
| 961 --releasedMailboxInfo; | 961 --releasedMailboxInfo; |
| 962 if (releasedMailboxInfo->m_mailbox == mailbox) | 962 if (releasedMailboxInfo->m_mailbox == mailbox) |
| 963 break; | 963 break; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 default; | 1116 default; |
| 1117 | 1117 |
| 1118 void Canvas2DLayerBridge::Logger::reportHibernationEvent( | 1118 void Canvas2DLayerBridge::Logger::reportHibernationEvent( |
| 1119 HibernationEvent event) { | 1119 HibernationEvent event) { |
| 1120 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, | 1120 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, |
| 1121 ("Canvas.HibernationEvents", HibernationEventCount)); | 1121 ("Canvas.HibernationEvents", HibernationEventCount)); |
| 1122 hibernationHistogram.count(event); | 1122 hibernationHistogram.count(event); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 } // namespace blink | 1125 } // namespace blink |
| OLD | NEW |