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

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

Issue 1830033003: Make lost context callback a base::Closure thru the WGC3DProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lostcontext-webclosure: no-lambdas-sadface Created 4 years, 9 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 HeapHashSet<WeakMember<WebGLContextObject>> m_contextObjects; 518 HeapHashSet<WeakMember<WebGLContextObject>> m_contextObjects;
519 #else 519 #else
520 // The hash set isn't traced, hence the references are effectively 520 // The hash set isn't traced, hence the references are effectively
521 // weakly kept. Each WebGLContextObject is responsible for detaching 521 // weakly kept. Each WebGLContextObject is responsible for detaching
522 // itself upon finalization if the WebGLRenderingContextBase hasn't been 522 // itself upon finalization if the WebGLRenderingContextBase hasn't been
523 // finalized already and detached them via detachAndRemoveAllObjects(). 523 // finalized already and detached them via detachAndRemoveAllObjects().
524 // See http://crbug.com/534524 for the details. 524 // See http://crbug.com/534524 for the details.
525 HashSet<UntracedMember<WebGLContextObject>> m_contextObjects; 525 HashSet<UntracedMember<WebGLContextObject>> m_contextObjects;
526 #endif 526 #endif
527 527
528 PersistentWillBeMember<WebGLRenderingContextLostCallback> m_contextLostCallb ackAdapter;
529 PersistentWillBeMember<WebGLRenderingContextErrorMessageCallback> m_errorMes sageCallbackAdapter; 528 PersistentWillBeMember<WebGLRenderingContextErrorMessageCallback> m_errorMes sageCallbackAdapter;
530 529
531 // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER a nd stored values for ELEMENT_ARRAY_BUFFER 530 // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER a nd stored values for ELEMENT_ARRAY_BUFFER
532 PersistentWillBeMember<WebGLBuffer> m_boundArrayBuffer; 531 PersistentWillBeMember<WebGLBuffer> m_boundArrayBuffer;
533 532
534 PersistentWillBeMember<WebGLVertexArrayObjectBase> m_defaultVertexArrayObjec t; 533 PersistentWillBeMember<WebGLVertexArrayObjectBase> m_defaultVertexArrayObjec t;
535 PersistentWillBeMember<WebGLVertexArrayObjectBase> m_boundVertexArrayObject; 534 PersistentWillBeMember<WebGLVertexArrayObjectBase> m_boundVertexArrayObject;
536 bool m_preservedDefaultVAOObjectWrapper; 535 bool m_preservedDefaultVAOObjectWrapper;
537 void setBoundVertexArrayObject(ScriptState*, WebGLVertexArrayObjectBase*); 536 void setBoundVertexArrayObject(ScriptState*, WebGLVertexArrayObjectBase*);
538 537
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 #endif 1103 #endif
1105 }; 1104 };
1106 1105
1107 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 1106 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
1108 1107
1109 } // namespace blink 1108 } // namespace blink
1110 1109
1111 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 1110 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
1112 1111
1113 #endif // WebGLRenderingContextBase_h 1112 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698