| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 bool paintRenderingResultsToImageData(int&, int&, SourceDrawingBuffer, WTF::
ArrayBufferContents&); | 164 bool paintRenderingResultsToImageData(int&, int&, SourceDrawingBuffer, WTF::
ArrayBufferContents&); |
| 165 | 165 |
| 166 int sampleCount() const { return m_sampleCount; } | 166 int sampleCount() const { return m_sampleCount; } |
| 167 bool explicitResolveOfMultisampleData() const { return m_antiAliasingMode ==
MSAAExplicitResolve; } | 167 bool explicitResolveOfMultisampleData() const { return m_antiAliasingMode ==
MSAAExplicitResolve; } |
| 168 | 168 |
| 169 // Bind to m_drawFramebufferBinding or m_readFramebufferBinding if it's not
0. | 169 // Bind to m_drawFramebufferBinding or m_readFramebufferBinding if it's not
0. |
| 170 // Otherwise, bind to the default FBO. | 170 // Otherwise, bind to the default FBO. |
| 171 void restoreFramebufferBindings(); | 171 void restoreFramebufferBindings(); |
| 172 | 172 |
| 173 void addNewMailboxCallback(PassOwnPtr<Closure> closure) { m_newMailboxCallba
ck = std::move(closure); } | 173 void addNewMailboxCallback(PassOwnPtr<SameThreadClosure> closure) { m_newMai
lboxCallback = std::move(closure); } |
| 174 | 174 |
| 175 protected: // For unittests | 175 protected: // For unittests |
| 176 DrawingBuffer( | 176 DrawingBuffer( |
| 177 PassOwnPtr<WebGraphicsContext3D>, | 177 PassOwnPtr<WebGraphicsContext3D>, |
| 178 PassOwnPtr<Extensions3DUtil>, | 178 PassOwnPtr<Extensions3DUtil>, |
| 179 bool multisampleExtensionSupported, | 179 bool multisampleExtensionSupported, |
| 180 bool discardFramebufferSupported, | 180 bool discardFramebufferSupported, |
| 181 PreserveDrawingBuffer, | 181 PreserveDrawingBuffer, |
| 182 WebGraphicsContext3D::Attributes requestedAttributes); | 182 WebGraphicsContext3D::Attributes requestedAttributes); |
| 183 | 183 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 bool m_discardFramebufferSupported; | 306 bool m_discardFramebufferSupported; |
| 307 Platform3DObject m_fbo; | 307 Platform3DObject m_fbo; |
| 308 // DrawingBuffer's output is double-buffered. m_colorBuffer is the back buff
er. | 308 // DrawingBuffer's output is double-buffered. m_colorBuffer is the back buff
er. |
| 309 TextureInfo m_colorBuffer; | 309 TextureInfo m_colorBuffer; |
| 310 struct FrontBufferInfo { | 310 struct FrontBufferInfo { |
| 311 TextureInfo texInfo; | 311 TextureInfo texInfo; |
| 312 WebExternalTextureMailbox mailbox; | 312 WebExternalTextureMailbox mailbox; |
| 313 }; | 313 }; |
| 314 FrontBufferInfo m_frontColorBuffer; | 314 FrontBufferInfo m_frontColorBuffer; |
| 315 | 315 |
| 316 OwnPtr<Closure> m_newMailboxCallback; | 316 OwnPtr<SameThreadClosure> m_newMailboxCallback; |
| 317 | 317 |
| 318 // This is used when the user requests either a depth or stencil buffer. | 318 // This is used when the user requests either a depth or stencil buffer. |
| 319 Platform3DObject m_depthStencilBuffer; | 319 Platform3DObject m_depthStencilBuffer; |
| 320 | 320 |
| 321 // For multisampling. | 321 // For multisampling. |
| 322 Platform3DObject m_multisampleFBO; | 322 Platform3DObject m_multisampleFBO; |
| 323 Platform3DObject m_multisampleColorBuffer; | 323 Platform3DObject m_multisampleColorBuffer; |
| 324 | 324 |
| 325 // True if our contents have been modified since the last presentation of th
is buffer. | 325 // True if our contents have been modified since the last presentation of th
is buffer. |
| 326 bool m_contentsChanged; | 326 bool m_contentsChanged; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 // used to resize the Canvas. | 360 // used to resize the Canvas. |
| 361 SkBitmap m_resizingBitmap; | 361 SkBitmap m_resizingBitmap; |
| 362 | 362 |
| 363 // Used to flip a bitmap vertically. | 363 // Used to flip a bitmap vertically. |
| 364 Vector<uint8_t> m_scanline; | 364 Vector<uint8_t> m_scanline; |
| 365 }; | 365 }; |
| 366 | 366 |
| 367 } // namespace blink | 367 } // namespace blink |
| 368 | 368 |
| 369 #endif // DrawingBuffer_h | 369 #endif // DrawingBuffer_h |
| OLD | NEW |