| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // GL_DRAW_FRAMEBUFFER. | 161 // GL_DRAW_FRAMEBUFFER. |
| 162 void resolveAndBindForReadAndDraw(); | 162 void resolveAndBindForReadAndDraw(); |
| 163 | 163 |
| 164 bool multisample() const; | 164 bool multisample() const; |
| 165 | 165 |
| 166 bool discardFramebufferSupported() const { | 166 bool discardFramebufferSupported() const { |
| 167 return m_discardFramebufferSupported; | 167 return m_discardFramebufferSupported; |
| 168 } | 168 } |
| 169 | 169 |
| 170 // Returns false if the contents had previously been marked as changed and | 170 // Returns false if the contents had previously been marked as changed and |
| 171 // have not yet been committed. | 171 // have not yet been resolved. |
| 172 bool markContentsChanged(); | 172 bool markContentsChanged(); |
| 173 void setBufferClearNeeded(bool); | 173 void setBufferClearNeeded(bool); |
| 174 bool bufferClearNeeded() const; | 174 bool bufferClearNeeded() const; |
| 175 void setIsHidden(bool); | 175 void setIsHidden(bool); |
| 176 void setFilterQuality(SkFilterQuality); | 176 void setFilterQuality(SkFilterQuality); |
| 177 | 177 |
| 178 // Whether the target for draw operations has format GL_RGBA, but is | 178 // Whether the target for draw operations has format GL_RGBA, but is |
| 179 // emulating format GL_RGB. When the target's storage is first | 179 // emulating format GL_RGB. When the target's storage is first |
| 180 // allocated, its alpha channel must be cleared to 1. All future drawing | 180 // allocated, its alpha channel must be cleared to 1. All future drawing |
| 181 // operations must use a color mask with alpha=GL_FALSE. | 181 // operations must use a color mask with alpha=GL_FALSE. |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 private: | 335 private: |
| 336 WTF_MAKE_NONCOPYABLE(ColorBuffer); | 336 WTF_MAKE_NONCOPYABLE(ColorBuffer); |
| 337 }; | 337 }; |
| 338 | 338 |
| 339 // The same as clearFramebuffers(), but leaves GL state dirty. | 339 // The same as clearFramebuffers(), but leaves GL state dirty. |
| 340 void clearFramebuffersInternal(GLbitfield clearMask); | 340 void clearFramebuffersInternal(GLbitfield clearMask); |
| 341 | 341 |
| 342 // The same as reset(), but leaves GL state dirty. | 342 // The same as reset(), but leaves GL state dirty. |
| 343 bool resizeFramebufferInternal(const IntSize&); | 343 bool resizeFramebufferInternal(const IntSize&); |
| 344 | 344 |
| 345 // The same as commit(), but leaves GL state dirty. | 345 // The same as resolveAndBindForReadAndDraw(), but leaves GL state dirty. |
| 346 void resolveMultisampleFramebufferInternal(); | 346 void resolveMultisampleFramebufferInternal(); |
| 347 | 347 |
| 348 // Resolves m_multisampleFBO into m_fbo, if multisampling. |
| 349 void resolveIfNeeded(); |
| 350 |
| 348 bool prepareTextureMailboxInternal( | 351 bool prepareTextureMailboxInternal( |
| 349 cc::TextureMailbox* outMailbox, | 352 cc::TextureMailbox* outMailbox, |
| 350 std::unique_ptr<cc::SingleReleaseCallback>* outReleaseCallback, | 353 std::unique_ptr<cc::SingleReleaseCallback>* outReleaseCallback, |
| 351 bool forceGpuResult); | 354 bool forceGpuResult); |
| 352 | 355 |
| 353 // Helper functions to be called only by prepareTextureMailboxInternal. | 356 // Helper functions to be called only by prepareTextureMailboxInternal. |
| 354 bool finishPrepareTextureMailboxGpu( | 357 bool finishPrepareTextureMailboxGpu( |
| 355 cc::TextureMailbox* outMailbox, | 358 cc::TextureMailbox* outMailbox, |
| 356 std::unique_ptr<cc::SingleReleaseCallback>* outReleaseCallback); | 359 std::unique_ptr<cc::SingleReleaseCallback>* outReleaseCallback); |
| 357 bool finishPrepareTextureMailboxSoftware( | 360 bool finishPrepareTextureMailboxSoftware( |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 RefPtr<ColorBuffer> m_backColorBuffer; | 477 RefPtr<ColorBuffer> m_backColorBuffer; |
| 475 | 478 |
| 476 // The ColorBuffer that was most recently presented to the compositor by | 479 // The ColorBuffer that was most recently presented to the compositor by |
| 477 // prepareTextureMailboxInternal. | 480 // prepareTextureMailboxInternal. |
| 478 RefPtr<ColorBuffer> m_frontColorBuffer; | 481 RefPtr<ColorBuffer> m_frontColorBuffer; |
| 479 | 482 |
| 480 // True if our contents have been modified since the last presentation of this | 483 // True if our contents have been modified since the last presentation of this |
| 481 // buffer. | 484 // buffer. |
| 482 bool m_contentsChanged = true; | 485 bool m_contentsChanged = true; |
| 483 | 486 |
| 484 // True if commit() has been called since the last time markContentsChanged() | 487 // True if resolveIfNeeded() has been called since the last time |
| 485 // had been called. | 488 // markContentsChanged() had been called. |
| 486 bool m_contentsChangeCommitted = false; | 489 bool m_contentsChangeResolved = false; |
| 487 bool m_bufferClearNeeded = false; | 490 bool m_bufferClearNeeded = false; |
| 488 | 491 |
| 489 // Whether the client wants a depth or stencil buffer. | 492 // Whether the client wants a depth or stencil buffer. |
| 490 const bool m_wantDepth; | 493 const bool m_wantDepth; |
| 491 const bool m_wantStencil; | 494 const bool m_wantStencil; |
| 492 | 495 |
| 493 // The color space of this buffer. All buffers are assumed to be sRGB until | 496 // The color space of this buffer. All buffers are assumed to be sRGB until |
| 494 // a mechanism for creating otherwise is exposed to the web. | 497 // a mechanism for creating otherwise is exposed to the web. |
| 495 const gfx::ColorSpace m_colorSpace; | 498 const gfx::ColorSpace m_colorSpace; |
| 496 | 499 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 527 // RuntimeEnabledFeatures::webGLImageChromiumEnabled() call with | 530 // RuntimeEnabledFeatures::webGLImageChromiumEnabled() call with |
| 528 // shouldUseChromiumImage() calls, and set m_chromiumImageUsage to | 531 // shouldUseChromiumImage() calls, and set m_chromiumImageUsage to |
| 529 // DisallowChromiumImage in the case of OffscreenCanvas. | 532 // DisallowChromiumImage in the case of OffscreenCanvas. |
| 530 ChromiumImageUsage m_chromiumImageUsage; | 533 ChromiumImageUsage m_chromiumImageUsage; |
| 531 bool shouldUseChromiumImage(); | 534 bool shouldUseChromiumImage(); |
| 532 }; | 535 }; |
| 533 | 536 |
| 534 } // namespace blink | 537 } // namespace blink |
| 535 | 538 |
| 536 #endif // DrawingBuffer_h | 539 #endif // DrawingBuffer_h |
| OLD | NEW |