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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 int sampleCount() const { return m_sampleCount; } | 211 int sampleCount() const { return m_sampleCount; } |
212 bool explicitResolveOfMultisampleData() const { return m_antiAliasingMode ==
MSAAExplicitResolve; } | 212 bool explicitResolveOfMultisampleData() const { return m_antiAliasingMode ==
MSAAExplicitResolve; } |
213 | 213 |
214 // Bind to m_drawFramebufferBinding or m_readFramebufferBinding if it's not
0. | 214 // Bind to m_drawFramebufferBinding or m_readFramebufferBinding if it's not
0. |
215 // Otherwise, bind to the default FBO. | 215 // Otherwise, bind to the default FBO. |
216 void restoreFramebufferBindings(); | 216 void restoreFramebufferBindings(); |
217 | 217 |
218 void restoreTextureBindings(); | 218 void restoreTextureBindings(); |
219 | 219 |
220 void addNewMailboxCallback(std::unique_ptr<SameThreadClosure> closure) { m_n
ewMailboxCallback = std::move(closure); } | 220 void addNewMailboxCallback(std::unique_ptr<WTF::Closure> closure) { m_newMai
lboxCallback = std::move(closure); } |
221 | 221 |
222 protected: // For unittests | 222 protected: // For unittests |
223 DrawingBuffer( | 223 DrawingBuffer( |
224 std::unique_ptr<WebGraphicsContext3DProvider>, | 224 std::unique_ptr<WebGraphicsContext3DProvider>, |
225 std::unique_ptr<Extensions3DUtil>, | 225 std::unique_ptr<Extensions3DUtil>, |
226 bool discardFramebufferSupported, | 226 bool discardFramebufferSupported, |
227 bool wantAlphaChannel, | 227 bool wantAlphaChannel, |
228 bool premultipliedAlpha, | 228 bool premultipliedAlpha, |
229 PreserveDrawingBuffer, | 229 PreserveDrawingBuffer, |
230 bool wantsDepth, | 230 bool wantsDepth, |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 const bool m_discardFramebufferSupported; | 375 const bool m_discardFramebufferSupported; |
376 const bool m_wantAlphaChannel; | 376 const bool m_wantAlphaChannel; |
377 const bool m_premultipliedAlpha; | 377 const bool m_premultipliedAlpha; |
378 bool m_hasImplicitStencilBuffer = false; | 378 bool m_hasImplicitStencilBuffer = false; |
379 struct FrontBufferInfo { | 379 struct FrontBufferInfo { |
380 TextureInfo texInfo; | 380 TextureInfo texInfo; |
381 WebExternalTextureMailbox mailbox; | 381 WebExternalTextureMailbox mailbox; |
382 }; | 382 }; |
383 FrontBufferInfo m_frontColorBuffer; | 383 FrontBufferInfo m_frontColorBuffer; |
384 | 384 |
385 std::unique_ptr<SameThreadClosure> m_newMailboxCallback; | 385 std::unique_ptr<WTF::Closure> m_newMailboxCallback; |
386 | 386 |
387 // This is used when the user requests either a depth or stencil buffer. | 387 // This is used when the user requests either a depth or stencil buffer. |
388 GLuint m_depthStencilBuffer = 0; | 388 GLuint m_depthStencilBuffer = 0; |
389 | 389 |
390 // When wantExplicitResolve() returns true, the target of all draw | 390 // When wantExplicitResolve() returns true, the target of all draw |
391 // operations. | 391 // operations. |
392 GLuint m_multisampleFBO = 0; | 392 GLuint m_multisampleFBO = 0; |
393 | 393 |
394 // The id of the renderbuffer storage for |m_multisampleFBO|. | 394 // The id of the renderbuffer storage for |m_multisampleFBO|. |
395 GLuint m_multisampleRenderbuffer = 0; | 395 GLuint m_multisampleRenderbuffer = 0; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 // used to resize the Canvas. | 444 // used to resize the Canvas. |
445 SkBitmap m_resizingBitmap; | 445 SkBitmap m_resizingBitmap; |
446 | 446 |
447 // Used to flip a bitmap vertically. | 447 // Used to flip a bitmap vertically. |
448 Vector<uint8_t> m_scanline; | 448 Vector<uint8_t> m_scanline; |
449 }; | 449 }; |
450 | 450 |
451 } // namespace blink | 451 } // namespace blink |
452 | 452 |
453 #endif // DrawingBuffer_h | 453 #endif // DrawingBuffer_h |
OLD | NEW |