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

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

Issue 2091713002: Specialize base::IsWeakReceiver for Blink weak pointers to support base::Bind (1/5) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +#include for build fix Created 4 years, 6 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 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 static void deactivateContext(WebGLRenderingContextBase*); 1082 static void deactivateContext(WebGLRenderingContextBase*);
1083 static void addToEvictedList(WebGLRenderingContextBase*); 1083 static void addToEvictedList(WebGLRenderingContextBase*);
1084 static void removeFromEvictedList(WebGLRenderingContextBase*); 1084 static void removeFromEvictedList(WebGLRenderingContextBase*);
1085 static void willDestroyContext(WebGLRenderingContextBase*); 1085 static void willDestroyContext(WebGLRenderingContextBase*);
1086 static void forciblyLoseOldestContext(const String& reason); 1086 static void forciblyLoseOldestContext(const String& reason);
1087 // Return the least recently used context's position in the active context v ector. 1087 // Return the least recently used context's position in the active context v ector.
1088 // If the vector is empty, return the maximum allowed active context number. 1088 // If the vector is empty, return the maximum allowed active context number.
1089 static WebGLRenderingContextBase* oldestContext(); 1089 static WebGLRenderingContextBase* oldestContext();
1090 static WebGLRenderingContextBase* oldestEvictedContext(); 1090 static WebGLRenderingContextBase* oldestEvictedContext();
1091 1091
1092 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB ase>(this); }
1093
1094 ImageBitmap* transferToImageBitmapBase(); 1092 ImageBitmap* transferToImageBitmapBase();
1095 1093
1096 // Helper functions for tex(Sub)Image2D && texSubImage3D 1094 // Helper functions for tex(Sub)Image2D && texSubImage3D
1097 void texImageHelperDOMArrayBufferView(TexImageFunctionID, GLenum, GLint, GLi nt, GLsizei, GLsizei, GLint, GLenum, GLenum, GLsizei, GLint, GLint, GLint, DOMAr rayBufferView*); 1095 void texImageHelperDOMArrayBufferView(TexImageFunctionID, GLenum, GLint, GLi nt, GLsizei, GLsizei, GLint, GLenum, GLenum, GLsizei, GLint, GLint, GLint, DOMAr rayBufferView*);
1098 void texImageHelperImageData(TexImageFunctionID, GLenum, GLint, GLint, GLint , GLenum, GLenum, GLsizei, GLint, GLint, GLint, ImageData*); 1096 void texImageHelperImageData(TexImageFunctionID, GLenum, GLint, GLint, GLint , GLenum, GLenum, GLsizei, GLint, GLint, GLint, ImageData*);
1099 void texImageHelperHTMLImageElement(TexImageFunctionID, GLenum, GLint, GLint , GLenum, GLenum, GLint, GLint, GLint, HTMLImageElement*, ExceptionState&); 1097 void texImageHelperHTMLImageElement(TexImageFunctionID, GLenum, GLint, GLint , GLenum, GLenum, GLint, GLint, GLint, HTMLImageElement*, ExceptionState&);
1100 void texImageHelperHTMLCanvasElement(TexImageFunctionID, GLenum, GLint, GLin t, GLenum, GLenum, GLint, GLint, GLint, HTMLCanvasElement*, ExceptionState&); 1098 void texImageHelperHTMLCanvasElement(TexImageFunctionID, GLenum, GLint, GLin t, GLenum, GLenum, GLint, GLint, GLint, HTMLCanvasElement*, ExceptionState&);
1101 void texImageHelperHTMLVideoElement(TexImageFunctionID, GLenum, GLint, GLint , GLenum, GLenum, GLint, GLint, GLint, HTMLVideoElement*, ExceptionState&); 1099 void texImageHelperHTMLVideoElement(TexImageFunctionID, GLenum, GLint, GLint , GLenum, GLenum, GLint, GLint, GLint, HTMLVideoElement*, ExceptionState&);
1102 void texImageHelperImageBitmap(TexImageFunctionID, GLenum, GLint, GLint, GLe num, GLenum, GLint, GLint, GLint, ImageBitmap*, ExceptionState&); 1100 void texImageHelperImageBitmap(TexImageFunctionID, GLenum, GLint, GLint, GLe num, GLenum, GLint, GLint, GLint, ImageBitmap*, ExceptionState&);
1103 static const char* getTexImageFunctionName(TexImageFunctionID); 1101 static const char* getTexImageFunctionName(TexImageFunctionID);
1104 1102
1105 private: 1103 private:
1106 WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, std::unique_ ptr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&); 1104 WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, std::unique_ ptr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&);
1107 static std::unique_ptr<WebGraphicsContext3DProvider> createContextProviderIn ternal(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned); 1105 static std::unique_ptr<WebGraphicsContext3DProvider> createContextProviderIn ternal(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned);
1108 }; 1106 };
1109 1107
1110 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 1108 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
1111 1109
1112 } // namespace blink 1110 } // namespace blink
1113 1111
1114 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 1112 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
1115 1113
1116 #endif // WebGLRenderingContextBase_h 1114 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698