OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 ASSERT_EQ(target, drawingBufferTextureTarget()); | 110 ASSERT_EQ(target, drawingBufferTextureTarget()); |
111 ASSERT_TRUE(m_textureSizes.contains(texture)); | 111 ASSERT_TRUE(m_textureSizes.contains(texture)); |
112 m_mostRecentlyProducedSize = m_textureSizes.get(texture); | 112 m_mostRecentlyProducedSize = m_textureSizes.get(texture); |
113 } | 113 } |
114 | 114 |
115 IntSize mostRecentlyProducedSize() | 115 IntSize mostRecentlyProducedSize() |
116 { | 116 { |
117 return m_mostRecentlyProducedSize; | 117 return m_mostRecentlyProducedSize; |
118 } | 118 } |
119 | 119 |
120 bool insertSyncPoint(WGC3Dbyte* syncToken) override | |
121 { | |
122 static WGC3Duint syncPointGenerator = 0; | |
123 WGC3Duint newSyncPoint = ++syncPointGenerator; | |
124 memcpy(syncToken, &newSyncPoint, sizeof(newSyncPoint)); | |
125 return true; | |
126 } | |
127 | |
128 WGC3Duint64 insertFenceSyncCHROMIUM() override | 120 WGC3Duint64 insertFenceSyncCHROMIUM() override |
129 { | 121 { |
130 static WGC3Duint64 syncPointGenerator = 0; | 122 static WGC3Duint64 syncPointGenerator = 0; |
131 return ++syncPointGenerator; | 123 return ++syncPointGenerator; |
132 } | 124 } |
133 | 125 |
134 bool genSyncTokenCHROMIUM(WGC3Duint64 fenceSync, WGC3Dbyte* syncToken) overr
ide | 126 bool genSyncTokenCHROMIUM(WGC3Duint64 fenceSync, WGC3Dbyte* syncToken) overr
ide |
135 { | 127 { |
136 memcpy(syncToken, &fenceSync, sizeof(fenceSync)); | 128 memcpy(syncToken, &fenceSync, sizeof(fenceSync)); |
137 return true; | 129 return true; |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 // m_drawingBuffer deletes mailbox immediately when hidden. | 683 // m_drawingBuffer deletes mailbox immediately when hidden. |
692 | 684 |
693 WGC3Duint waitSyncToken = 0; | 685 WGC3Duint waitSyncToken = 0; |
694 memcpy(&waitSyncToken, mailbox.syncToken, sizeof(waitSyncToken)); | 686 memcpy(&waitSyncToken, mailbox.syncToken, sizeof(waitSyncToken)); |
695 EXPECT_EQ(waitSyncToken, webContext()->mostRecentlyWaitedSyncToken()); | 687 EXPECT_EQ(waitSyncToken, webContext()->mostRecentlyWaitedSyncToken()); |
696 | 688 |
697 m_drawingBuffer->beginDestruction(); | 689 m_drawingBuffer->beginDestruction(); |
698 } | 690 } |
699 | 691 |
700 } // namespace blink | 692 } // namespace blink |
OLD | NEW |