OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 Member<WebGLTexture> m_texture2DArrayBinding; | 409 Member<WebGLTexture> m_texture2DArrayBinding; |
410 | 410 |
411 DECLARE_TRACE(); | 411 DECLARE_TRACE(); |
412 }; | 412 }; |
413 | 413 |
414 void setFilterQuality(SkFilterQuality) override; | 414 void setFilterQuality(SkFilterQuality) override; |
415 bool isWebGL2OrHigher() { return version() >= 2; } | 415 bool isWebGL2OrHigher() { return version() >= 2; } |
416 | 416 |
417 void getHTMLOrOffscreenCanvas(HTMLCanvasElementOrOffscreenCanvas&) const; | 417 void getHTMLOrOffscreenCanvas(HTMLCanvasElementOrOffscreenCanvas&) const; |
418 | 418 |
| 419 DrawingBuffer* drawingBuffer() const; |
| 420 |
419 protected: | 421 protected: |
420 friend class EXTDisjointTimerQuery; | 422 friend class EXTDisjointTimerQuery; |
421 friend class WebGLDrawBuffers; | 423 friend class WebGLDrawBuffers; |
422 friend class WebGLFramebuffer; | 424 friend class WebGLFramebuffer; |
423 friend class WebGLObject; | 425 friend class WebGLObject; |
424 friend class WebGLContextObject; | 426 friend class WebGLContextObject; |
425 friend class OESVertexArrayObject; | 427 friend class OESVertexArrayObject; |
426 friend class WebGLDebugShaders; | 428 friend class WebGLDebugShaders; |
427 friend class WebGLCompressedTextureASTC; | 429 friend class WebGLCompressedTextureASTC; |
428 friend class WebGLCompressedTextureATC; | 430 friend class WebGLCompressedTextureATC; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 // Restore the client unpack parameters. | 481 // Restore the client unpack parameters. |
480 virtual void restoreUnpackParameters(); | 482 virtual void restoreUnpackParameters(); |
481 | 483 |
482 PassRefPtr<Image> drawImageIntoBuffer(PassRefPtr<Image>, int width, int heig
ht, const char* functionName); | 484 PassRefPtr<Image> drawImageIntoBuffer(PassRefPtr<Image>, int width, int heig
ht, const char* functionName); |
483 | 485 |
484 PassRefPtr<Image> videoFrameToImage(HTMLVideoElement*); | 486 PassRefPtr<Image> videoFrameToImage(HTMLVideoElement*); |
485 | 487 |
486 // Structure for rendering to a DrawingBuffer, instead of directly | 488 // Structure for rendering to a DrawingBuffer, instead of directly |
487 // to the back-buffer of m_context. | 489 // to the back-buffer of m_context. |
488 RefPtr<DrawingBuffer> m_drawingBuffer; | 490 RefPtr<DrawingBuffer> m_drawingBuffer; |
489 DrawingBuffer* drawingBuffer() const; | |
490 | 491 |
491 RefPtr<WebGLContextGroup> m_contextGroup; | 492 RefPtr<WebGLContextGroup> m_contextGroup; |
492 | 493 |
493 bool m_isHidden; | 494 bool m_isHidden; |
494 LostContextMode m_contextLostMode; | 495 LostContextMode m_contextLostMode; |
495 AutoRecoveryMethod m_autoRecoveryMethod; | 496 AutoRecoveryMethod m_autoRecoveryMethod; |
496 // Dispatches a context lost event once it is determined that one is needed. | 497 // Dispatches a context lost event once it is determined that one is needed. |
497 // This is used for synthetic, WEBGL_lose_context and real context losses. F
or real ones, it's | 498 // This is used for synthetic, WEBGL_lose_context and real context losses. F
or real ones, it's |
498 // likely that there's no JavaScript on the stack, but that might be depende
nt | 499 // likely that there's no JavaScript on the stack, but that might be depende
nt |
499 // on how exactly the platform discovers that the context was lost. For bett
er | 500 // on how exactly the platform discovers that the context was lost. For bett
er |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 const unsigned m_version; | 1120 const unsigned m_version; |
1120 }; | 1121 }; |
1121 | 1122 |
1122 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1123 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
1123 | 1124 |
1124 } // namespace blink | 1125 } // namespace blink |
1125 | 1126 |
1126 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1127 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
1127 | 1128 |
1128 #endif // WebGLRenderingContextBase_h | 1129 #endif // WebGLRenderingContextBase_h |
OLD | NEW |