| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Destroys the TEXTURE_2D binding for the owned context | 173 // Destroys the TEXTURE_2D binding for the owned context |
| 174 bool copyToPlatformTexture(WebGraphicsContext3D*, Platform3DObject texture,
GLenum internalFormat, | 174 bool copyToPlatformTexture(WebGraphicsContext3D*, Platform3DObject texture,
GLenum internalFormat, |
| 175 GLenum destType, GLint level, bool premultiplyAlpha, bool flipY, SourceD
rawingBuffer); | 175 GLenum destType, GLint level, bool premultiplyAlpha, bool flipY, SourceD
rawingBuffer); |
| 176 | 176 |
| 177 void setPackAlignment(GLint param); | 177 void setPackAlignment(GLint param); |
| 178 | 178 |
| 179 void paintRenderingResultsToCanvas(ImageBuffer*); | 179 void paintRenderingResultsToCanvas(ImageBuffer*); |
| 180 bool paintRenderingResultsToImageData(int&, int&, SourceDrawingBuffer, WTF::
ArrayBufferContents&); | 180 bool paintRenderingResultsToImageData(int&, int&, SourceDrawingBuffer, WTF::
ArrayBufferContents&); |
| 181 | 181 |
| 182 int sampleCount() const { return m_sampleCount; } | 182 int sampleCount() const { return m_sampleCount; } |
| 183 bool explicitResolveOfMultisampleData() const { return m_multisampleMode ==
ExplicitResolve; } | 183 bool explicitResolveOfMultisampleData() const { return m_antiAliasingMode ==
MSAAExplicitResolve; } |
| 184 | 184 |
| 185 // Bind to m_drawFramebufferBinding or m_readFramebufferBinding if it's not
0. | 185 // Bind to m_drawFramebufferBinding or m_readFramebufferBinding if it's not
0. |
| 186 // Otherwise, bind to the default FBO. | 186 // Otherwise, bind to the default FBO. |
| 187 void restoreFramebufferBindings(); | 187 void restoreFramebufferBindings(); |
| 188 | 188 |
| 189 protected: // For unittests | 189 protected: // For unittests |
| 190 DrawingBuffer( | 190 DrawingBuffer( |
| 191 PassOwnPtr<WebGraphicsContext3D>, | 191 PassOwnPtr<WebGraphicsContext3D>, |
| 192 PassOwnPtr<Extensions3DUtil>, | 192 PassOwnPtr<Extensions3DUtil>, |
| 193 bool multisampleExtensionSupported, | 193 bool multisampleExtensionSupported, |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 Platform3DObject m_multisampleFBO; | 274 Platform3DObject m_multisampleFBO; |
| 275 Platform3DObject m_multisampleColorBuffer; | 275 Platform3DObject m_multisampleColorBuffer; |
| 276 | 276 |
| 277 // True if our contents have been modified since the last presentation of th
is buffer. | 277 // True if our contents have been modified since the last presentation of th
is buffer. |
| 278 bool m_contentsChanged; | 278 bool m_contentsChanged; |
| 279 | 279 |
| 280 // True if commit() has been called since the last time markContentsChanged(
) had been called. | 280 // True if commit() has been called since the last time markContentsChanged(
) had been called. |
| 281 bool m_contentsChangeCommitted; | 281 bool m_contentsChangeCommitted; |
| 282 bool m_bufferClearNeeded; | 282 bool m_bufferClearNeeded; |
| 283 | 283 |
| 284 enum MultisampleMode { | 284 enum AntialiasingMode { |
| 285 None, | 285 None, |
| 286 ImplicitResolve, | 286 MSAAImplicitResolve, |
| 287 ExplicitResolve, | 287 MSAAExplicitResolve, |
| 288 ScreenSpaceAntialiasing, |
| 288 }; | 289 }; |
| 289 | 290 |
| 290 MultisampleMode m_multisampleMode; | 291 AntialiasingMode m_antiAliasingMode; |
| 291 | 292 |
| 292 WebGraphicsContext3D::Attributes m_actualAttributes; | 293 WebGraphicsContext3D::Attributes m_actualAttributes; |
| 293 unsigned m_internalColorFormat; | 294 unsigned m_internalColorFormat; |
| 294 unsigned m_colorFormat; | 295 unsigned m_colorFormat; |
| 295 unsigned m_internalRenderbufferFormat; | 296 unsigned m_internalRenderbufferFormat; |
| 296 int m_maxTextureSize; | 297 int m_maxTextureSize; |
| 297 int m_sampleCount; | 298 int m_sampleCount; |
| 298 int m_packAlignment; | 299 int m_packAlignment; |
| 299 bool m_destructionInProgress; | 300 bool m_destructionInProgress; |
| 300 bool m_isHidden; | 301 bool m_isHidden; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 314 // used to resize the Canvas. | 315 // used to resize the Canvas. |
| 315 SkBitmap m_resizingBitmap; | 316 SkBitmap m_resizingBitmap; |
| 316 | 317 |
| 317 // Used to flip a bitmap vertically. | 318 // Used to flip a bitmap vertically. |
| 318 Vector<uint8_t> m_scanline; | 319 Vector<uint8_t> m_scanline; |
| 319 }; | 320 }; |
| 320 | 321 |
| 321 } // namespace blink | 322 } // namespace blink |
| 322 | 323 |
| 323 #endif // DrawingBuffer_h | 324 #endif // DrawingBuffer_h |
| OLD | NEW |