| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 PassRefPtr<MailboxInfo> getRecycledMailbox(); | 146 PassRefPtr<MailboxInfo> getRecycledMailbox(); |
| 147 PassRefPtr<MailboxInfo> createNewMailbox(unsigned); | 147 PassRefPtr<MailboxInfo> createNewMailbox(unsigned); |
| 148 | 148 |
| 149 // Updates the current size of the buffer, ensuring that s_currentResourceUs
ePixels is updated. | 149 // Updates the current size of the buffer, ensuring that s_currentResourceUs
ePixels is updated. |
| 150 void setSize(const IntSize& size); | 150 void setSize(const IntSize& size); |
| 151 | 151 |
| 152 // Calculates the difference in pixels between the current buffer size and t
he proposed size. | 152 // Calculates the difference in pixels between the current buffer size and t
he proposed size. |
| 153 int pixelDelta(const IntSize& size); | 153 int pixelDelta(const IntSize& size); |
| 154 | 154 |
| 155 // Given the desired buffer size, provides the largest dimensions that will
fit in the pixel budget |
| 156 // Returns true if the buffer will only fit if the oldest WebGL context is f
orcibly lost |
| 157 IntSize adjustSizeWithContextEviction(const IntSize&, bool& evictContext); |
| 158 |
| 155 PreserveDrawingBuffer m_preserveDrawingBuffer; | 159 PreserveDrawingBuffer m_preserveDrawingBuffer; |
| 156 bool m_scissorEnabled; | 160 bool m_scissorEnabled; |
| 157 Platform3DObject m_texture2DBinding; | 161 Platform3DObject m_texture2DBinding; |
| 158 Platform3DObject m_framebufferBinding; | 162 Platform3DObject m_framebufferBinding; |
| 159 GC3Denum m_activeTextureUnit; | 163 GC3Denum m_activeTextureUnit; |
| 160 | 164 |
| 161 RefPtr<GraphicsContext3D> m_context; | 165 RefPtr<GraphicsContext3D> m_context; |
| 162 IntSize m_size; | 166 IntSize m_size; |
| 163 bool m_multisampleExtensionSupported; | 167 bool m_multisampleExtensionSupported; |
| 164 bool m_packedDepthStencilExtensionSupported; | 168 bool m_packedDepthStencilExtensionSupported; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 190 // All of the mailboxes that this DrawingBuffer has ever created. | 194 // All of the mailboxes that this DrawingBuffer has ever created. |
| 191 Vector<RefPtr<MailboxInfo> > m_textureMailboxes; | 195 Vector<RefPtr<MailboxInfo> > m_textureMailboxes; |
| 192 // Mailboxes that were released by the compositor and can be used again by t
his DrawingBuffer. | 196 // Mailboxes that were released by the compositor and can be used again by t
his DrawingBuffer. |
| 193 Vector<RefPtr<MailboxInfo> > m_recycledMailboxes; | 197 Vector<RefPtr<MailboxInfo> > m_recycledMailboxes; |
| 194 RefPtr<MailboxInfo> m_lastColorBuffer; | 198 RefPtr<MailboxInfo> m_lastColorBuffer; |
| 195 }; | 199 }; |
| 196 | 200 |
| 197 } // namespace WebCore | 201 } // namespace WebCore |
| 198 | 202 |
| 199 #endif // DrawingBuffer_h | 203 #endif // DrawingBuffer_h |
| OLD | NEW |