| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "platform/PlatformExport.h" | 29 #include "platform/PlatformExport.h" |
| 30 #include "platform/geometry/IntSize.h" | 30 #include "platform/geometry/IntSize.h" |
| 31 #include "platform/graphics/ImageBufferSurface.h" | 31 #include "platform/graphics/ImageBufferSurface.h" |
| 32 #include "public/platform/WebExternalTextureLayer.h" | 32 #include "public/platform/WebExternalTextureLayer.h" |
| 33 #include "public/platform/WebExternalTextureLayerClient.h" | 33 #include "public/platform/WebExternalTextureLayerClient.h" |
| 34 #include "public/platform/WebExternalTextureMailbox.h" | 34 #include "public/platform/WebExternalTextureMailbox.h" |
| 35 #include "public/platform/WebThread.h" | 35 #include "public/platform/WebThread.h" |
| 36 #include "third_party/khronos/GLES2/gl2.h" | 36 #include "third_party/khronos/GLES2/gl2.h" |
| 37 #include "third_party/skia/include/core/SkImage.h" | 37 #include "third_party/skia/include/core/SkImage.h" |
| 38 #include "wtf/Allocator.h" |
| 38 #include "wtf/Deque.h" | 39 #include "wtf/Deque.h" |
| 39 #include "wtf/PassOwnPtr.h" | 40 #include "wtf/PassOwnPtr.h" |
| 40 #include "wtf/RefCounted.h" | 41 #include "wtf/RefCounted.h" |
| 41 #include "wtf/RefPtr.h" | 42 #include "wtf/RefPtr.h" |
| 42 | 43 |
| 43 class SkPictureRecorder; | 44 class SkPictureRecorder; |
| 44 | 45 |
| 45 namespace blink { | 46 namespace blink { |
| 46 | 47 |
| 47 class Canvas2DLayerBridgeTest; | 48 class Canvas2DLayerBridgeTest; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 bool m_destructionInProgress; | 121 bool m_destructionInProgress; |
| 121 SkFilterQuality m_filterQuality; | 122 SkFilterQuality m_filterQuality; |
| 122 bool m_isHidden; | 123 bool m_isHidden; |
| 123 bool m_isDeferralEnabled; | 124 bool m_isDeferralEnabled; |
| 124 bool m_isRegisteredTaskObserver; | 125 bool m_isRegisteredTaskObserver; |
| 125 bool m_renderingTaskCompletedForCurrentFrame; | 126 bool m_renderingTaskCompletedForCurrentFrame; |
| 126 | 127 |
| 127 friend class Canvas2DLayerBridgeTest; | 128 friend class Canvas2DLayerBridgeTest; |
| 128 | 129 |
| 129 struct MailboxInfo { | 130 struct MailboxInfo { |
| 131 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 130 WebExternalTextureMailbox m_mailbox; | 132 WebExternalTextureMailbox m_mailbox; |
| 131 RefPtr<SkImage> m_image; | 133 RefPtr<SkImage> m_image; |
| 132 RefPtr<Canvas2DLayerBridge> m_parentLayerBridge; | 134 RefPtr<Canvas2DLayerBridge> m_parentLayerBridge; |
| 133 | 135 |
| 134 MailboxInfo(const MailboxInfo&); | 136 MailboxInfo(const MailboxInfo&); |
| 135 MailboxInfo() {} | 137 MailboxInfo() {} |
| 136 }; | 138 }; |
| 137 | 139 |
| 138 uint32_t m_lastImageId; | 140 uint32_t m_lastImageId; |
| 139 | 141 |
| 140 enum { | 142 enum { |
| 141 // We should normally not have more that two active mailboxes at a time, | 143 // We should normally not have more that two active mailboxes at a time, |
| 142 // but sometime we may have three due to the async nature of mailbox han
dling. | 144 // but sometime we may have three due to the async nature of mailbox han
dling. |
| 143 MaxActiveMailboxes = 3, | 145 MaxActiveMailboxes = 3, |
| 144 }; | 146 }; |
| 145 | 147 |
| 146 Deque<MailboxInfo, MaxActiveMailboxes> m_mailboxes; | 148 Deque<MailboxInfo, MaxActiveMailboxes> m_mailboxes; |
| 147 GLenum m_lastFilter; | 149 GLenum m_lastFilter; |
| 148 AccelerationMode m_accelerationMode; | 150 AccelerationMode m_accelerationMode; |
| 149 OpacityMode m_opacityMode; | 151 OpacityMode m_opacityMode; |
| 150 IntSize m_size; | 152 IntSize m_size; |
| 151 int m_recordingPixelCount; | 153 int m_recordingPixelCount; |
| 152 }; | 154 }; |
| 153 | 155 |
| 154 } // namespace blink | 156 } // namespace blink |
| 155 | 157 |
| 156 #endif | 158 #endif |
| OLD | NEW |