Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Issue 2384593002: Encode frame number in pixel data for pose sync (Closed)
Patch Set: bajones #10: restoreStateFromContext, skip pixel read for non-async mode Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 532
533 // Restore as soon as possible, but only when 533 // Restore as soon as possible, but only when
534 // the canvas is visible. 534 // the canvas is visible.
535 Auto 535 Auto
536 }; 536 };
537 void loseContext(LostContextMode) override; 537 void loseContext(LostContextMode) override;
538 void forceLostContext(LostContextMode, AutoRecoveryMethod); 538 void forceLostContext(LostContextMode, AutoRecoveryMethod);
539 void forceRestoreContext(); 539 void forceRestoreContext();
540 void loseContextImpl(LostContextMode, AutoRecoveryMethod); 540 void loseContextImpl(LostContextMode, AutoRecoveryMethod);
541 541
542 enum StateMask {
543 StateInvalid = 0,
544 StateScissorEnabled = 1 << 0,
545 StateScissorBox = 1 << 1,
546 StateClearColor = 1 << 2,
547 StateClearDepthf = 1 << 3,
548 StateClearStencil = 1 << 4,
549 StateStencilMaskSeparate = 1 << 5,
550 StateColorMask = 1 << 6,
551 StateDepthMask = 1 << 7
552 };
553 // stateMask is a bit-mask of StateMask values, indicating the state
554 // settings to be restored from the saved script context.
555 void restoreStateFromContext(int stateMask);
556
542 gpu::gles2::GLES2Interface* contextGL() const { 557 gpu::gles2::GLES2Interface* contextGL() const {
543 DrawingBuffer* d = drawingBuffer(); 558 DrawingBuffer* d = drawingBuffer();
544 if (!d) 559 if (!d)
545 return nullptr; 560 return nullptr;
546 return d->contextGL(); 561 return d->contextGL();
547 } 562 }
548 WebGLContextGroup* contextGroup() const { return m_contextGroup.get(); } 563 WebGLContextGroup* contextGroup() const { return m_contextGroup.get(); }
549 Extensions3DUtil* extensionsUtil(); 564 Extensions3DUtil* extensionsUtil();
550 565
551 void reshape(int width, int height) override; 566 void reshape(int width, int height) override;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 GLenum m_readBufferOfDefaultFramebuffer; 769 GLenum m_readBufferOfDefaultFramebuffer;
755 770
756 GLint m_packAlignment; 771 GLint m_packAlignment;
757 GLint m_unpackAlignment; 772 GLint m_unpackAlignment;
758 bool m_unpackFlipY; 773 bool m_unpackFlipY;
759 bool m_unpackPremultiplyAlpha; 774 bool m_unpackPremultiplyAlpha;
760 GLenum m_unpackColorspaceConversion; 775 GLenum m_unpackColorspaceConversion;
761 776
762 GLfloat m_clearColor[4]; 777 GLfloat m_clearColor[4];
763 bool m_scissorEnabled; 778 bool m_scissorEnabled;
779 GLint m_scissorBox[4];
764 GLfloat m_clearDepth; 780 GLfloat m_clearDepth;
765 GLint m_clearStencil; 781 GLint m_clearStencil;
766 GLboolean m_colorMask[4]; 782 GLboolean m_colorMask[4];
767 GLboolean m_depthMask; 783 GLboolean m_depthMask;
768 784
769 bool m_stencilEnabled; 785 bool m_stencilEnabled;
770 GLuint m_stencilMask, m_stencilMaskBack; 786 GLuint m_stencilMask, m_stencilMaskBack;
771 GLint m_stencilFuncRef, 787 GLint m_stencilFuncRef,
772 m_stencilFuncRefBack; // Note that these are the user specified values, n ot the internal clamped value. 788 m_stencilFuncRefBack; // Note that these are the user specified values, n ot the internal clamped value.
773 GLuint m_stencilFuncMask, m_stencilFuncMaskBack; 789 GLuint m_stencilFuncMask, m_stencilFuncMaskBack;
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 context, 1526 context,
1511 context->is3d(), 1527 context->is3d(),
1512 context.is3d()); 1528 context.is3d());
1513 1529
1514 } // namespace blink 1530 } // namespace blink
1515 1531
1516 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( 1532 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(
1517 blink::WebGLRenderingContextBase::TextureUnitState); 1533 blink::WebGLRenderingContextBase::TextureUnitState);
1518 1534
1519 #endif // WebGLRenderingContextBase_h 1535 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698