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

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

Issue 2668573002: Migrate WebGL timers to TaskRunnerTimer (Closed)
Patch Set: add comment Created 3 years, 10 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 TraceWrapperMember<WebGLContextGroup> m_contextGroup; 684 TraceWrapperMember<WebGLContextGroup> m_contextGroup;
685 685
686 bool m_isHidden; 686 bool m_isHidden;
687 LostContextMode m_contextLostMode; 687 LostContextMode m_contextLostMode;
688 AutoRecoveryMethod m_autoRecoveryMethod; 688 AutoRecoveryMethod m_autoRecoveryMethod;
689 // Dispatches a context lost event once it is determined that one is needed. 689 // Dispatches a context lost event once it is determined that one is needed.
690 // This is used for synthetic, WEBGL_lose_context and real context losses. For 690 // This is used for synthetic, WEBGL_lose_context and real context losses. For
691 // real ones, it's likely that there's no JavaScript on the stack, but that 691 // real ones, it's likely that there's no JavaScript on the stack, but that
692 // might be dependent on how exactly the platform discovers that the context 692 // might be dependent on how exactly the platform discovers that the context
693 // was lost. For better portability we always defer the dispatch of the event. 693 // was lost. For better portability we always defer the dispatch of the event.
694 Timer<WebGLRenderingContextBase> m_dispatchContextLostEventTimer; 694 TaskRunnerTimer<WebGLRenderingContextBase> m_dispatchContextLostEventTimer;
695 bool m_restoreAllowed; 695 bool m_restoreAllowed;
696 Timer<WebGLRenderingContextBase> m_restoreTimer; 696 TaskRunnerTimer<WebGLRenderingContextBase> m_restoreTimer;
697 697
698 bool m_markedCanvasDirty; 698 bool m_markedCanvasDirty;
699 699
700 // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER and 700 // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER and
701 // stored values for ELEMENT_ARRAY_BUFFER 701 // stored values for ELEMENT_ARRAY_BUFFER
702 TraceWrapperMember<WebGLBuffer> m_boundArrayBuffer; 702 TraceWrapperMember<WebGLBuffer> m_boundArrayBuffer;
703 703
704 Member<WebGLVertexArrayObjectBase> m_defaultVertexArrayObject; 704 Member<WebGLVertexArrayObjectBase> m_defaultVertexArrayObject;
705 TraceWrapperMember<WebGLVertexArrayObjectBase> m_boundVertexArrayObject; 705 TraceWrapperMember<WebGLVertexArrayObjectBase> m_boundVertexArrayObject;
706 void setBoundVertexArrayObject(WebGLVertexArrayObjectBase*); 706 void setBoundVertexArrayObject(WebGLVertexArrayObjectBase*);
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 GLsizei width, 1629 GLsizei width,
1630 GLsizei height, 1630 GLsizei height,
1631 GLenum format, 1631 GLenum format,
1632 GLenum type, 1632 GLenum type,
1633 DOMArrayBufferView* pixels, 1633 DOMArrayBufferView* pixels,
1634 GLuint offset); 1634 GLuint offset);
1635 1635
1636 private: 1636 private:
1637 WebGLRenderingContextBase(HTMLCanvasElement*, 1637 WebGLRenderingContextBase(HTMLCanvasElement*,
1638 OffscreenCanvas*, 1638 OffscreenCanvas*,
1639 RefPtr<WebTaskRunner>,
1639 std::unique_ptr<WebGraphicsContext3DProvider>, 1640 std::unique_ptr<WebGraphicsContext3DProvider>,
1640 const CanvasContextCreationAttributes&, 1641 const CanvasContextCreationAttributes&,
1641 unsigned); 1642 unsigned);
1642 static std::unique_ptr<WebGraphicsContext3DProvider> 1643 static std::unique_ptr<WebGraphicsContext3DProvider>
1643 createContextProviderInternal(HTMLCanvasElement*, 1644 createContextProviderInternal(HTMLCanvasElement*,
1644 ScriptState*, 1645 ScriptState*,
1645 const CanvasContextCreationAttributes&, 1646 const CanvasContextCreationAttributes&,
1646 unsigned); 1647 unsigned);
1647 void texImageCanvasByGPU(TexImageFunctionID, 1648 void texImageCanvasByGPU(TexImageFunctionID,
1648 HTMLCanvasElement*, 1649 HTMLCanvasElement*,
(...skipping 17 matching lines...) Expand all
1666 context, 1667 context,
1667 context->is3d(), 1668 context->is3d(),
1668 context.is3d()); 1669 context.is3d());
1669 1670
1670 } // namespace blink 1671 } // namespace blink
1671 1672
1672 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( 1673 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(
1673 blink::WebGLRenderingContextBase::TextureUnitState); 1674 blink::WebGLRenderingContextBase::TextureUnitState);
1674 1675
1675 #endif // WebGLRenderingContextBase_h 1676 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698