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

Side by Side Diff: sky/engine/core/html/canvas/WebGLRenderingContextBase.h

Issue 701663002: Remove HTMLVideoElement. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 namespace blink { 52 namespace blink {
53 53
54 class ANGLEInstancedArrays; 54 class ANGLEInstancedArrays;
55 class EXTBlendMinMax; 55 class EXTBlendMinMax;
56 class EXTFragDepth; 56 class EXTFragDepth;
57 class EXTShaderTextureLOD; 57 class EXTShaderTextureLOD;
58 class EXTTextureFilterAnisotropic; 58 class EXTTextureFilterAnisotropic;
59 class ExceptionState; 59 class ExceptionState;
60 class HTMLImageElement; 60 class HTMLImageElement;
61 class HTMLVideoElement;
62 class ImageBuffer; 61 class ImageBuffer;
63 class ImageData; 62 class ImageData;
64 class IntSize; 63 class IntSize;
65 class OESElementIndexUint; 64 class OESElementIndexUint;
66 class OESStandardDerivatives; 65 class OESStandardDerivatives;
67 class OESTextureFloat; 66 class OESTextureFloat;
68 class OESTextureFloatLinear; 67 class OESTextureFloatLinear;
69 class OESTextureHalfFloat; 68 class OESTextureHalfFloat;
70 class OESTextureHalfFloatLinear; 69 class OESTextureHalfFloatLinear;
71 class OESVertexArrayObject; 70 class OESVertexArrayObject;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 235
237 void texImage2D(GLenum target, GLint level, GLenum internalformat, 236 void texImage2D(GLenum target, GLint level, GLenum internalformat,
238 GLsizei width, GLsizei height, GLint border, 237 GLsizei width, GLsizei height, GLint border,
239 GLenum format, GLenum type, ArrayBufferView*, ExceptionState&); 238 GLenum format, GLenum type, ArrayBufferView*, ExceptionState&);
240 void texImage2D(GLenum target, GLint level, GLenum internalformat, 239 void texImage2D(GLenum target, GLint level, GLenum internalformat,
241 GLenum format, GLenum type, ImageData*, ExceptionState&); 240 GLenum format, GLenum type, ImageData*, ExceptionState&);
242 void texImage2D(GLenum target, GLint level, GLenum internalformat, 241 void texImage2D(GLenum target, GLint level, GLenum internalformat,
243 GLenum format, GLenum type, HTMLImageElement*, ExceptionState&); 242 GLenum format, GLenum type, HTMLImageElement*, ExceptionState&);
244 void texImage2D(GLenum target, GLint level, GLenum internalformat, 243 void texImage2D(GLenum target, GLint level, GLenum internalformat,
245 GLenum format, GLenum type, HTMLCanvasElement*, ExceptionState&); 244 GLenum format, GLenum type, HTMLCanvasElement*, ExceptionState&);
246 void texImage2D(GLenum target, GLint level, GLenum internalformat,
247 GLenum format, GLenum type, HTMLVideoElement*, ExceptionState&);
248 245
249 void texParameterf(GLenum target, GLenum pname, GLfloat param); 246 void texParameterf(GLenum target, GLenum pname, GLfloat param);
250 void texParameteri(GLenum target, GLenum pname, GLint param); 247 void texParameteri(GLenum target, GLenum pname, GLint param);
251 248
252 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 249 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
253 GLsizei width, GLsizei height, 250 GLsizei width, GLsizei height,
254 GLenum format, GLenum type, ArrayBufferView*, ExceptionState&); 251 GLenum format, GLenum type, ArrayBufferView*, ExceptionState&);
255 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 252 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
256 GLenum format, GLenum type, ImageData*, ExceptionState&); 253 GLenum format, GLenum type, ImageData*, ExceptionState&);
257 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 254 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
258 GLenum format, GLenum type, HTMLImageElement*, ExceptionState&); 255 GLenum format, GLenum type, HTMLImageElement*, ExceptionState&);
259 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 256 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
260 GLenum format, GLenum type, HTMLCanvasElement*, ExceptionState&); 257 GLenum format, GLenum type, HTMLCanvasElement*, ExceptionState&);
261 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
262 GLenum format, GLenum type, HTMLVideoElement*, ExceptionState&);
263 258
264 void uniform1f(const WebGLUniformLocation*, GLfloat x); 259 void uniform1f(const WebGLUniformLocation*, GLfloat x);
265 void uniform1fv(const WebGLUniformLocation*, Float32Array* v); 260 void uniform1fv(const WebGLUniformLocation*, Float32Array* v);
266 void uniform1fv(const WebGLUniformLocation*, GLfloat* v, GLsizei); 261 void uniform1fv(const WebGLUniformLocation*, GLfloat* v, GLsizei);
267 void uniform1i(const WebGLUniformLocation*, GLint x); 262 void uniform1i(const WebGLUniformLocation*, GLint x);
268 void uniform1iv(const WebGLUniformLocation*, Int32Array* v); 263 void uniform1iv(const WebGLUniformLocation*, Int32Array* v);
269 void uniform1iv(const WebGLUniformLocation*, GLint* v, GLsizei); 264 void uniform1iv(const WebGLUniformLocation*, GLint* v, GLsizei);
270 void uniform2f(const WebGLUniformLocation*, GLfloat x, GLfloat y); 265 void uniform2f(const WebGLUniformLocation*, GLfloat x, GLfloat y);
271 void uniform2fv(const WebGLUniformLocation*, Float32Array* v); 266 void uniform2fv(const WebGLUniformLocation*, Float32Array* v);
272 void uniform2fv(const WebGLUniformLocation*, GLfloat* v, GLsizei); 267 void uniform2fv(const WebGLUniformLocation*, GLfloat* v, GLsizei);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 bool validateRenderingState(const char*); 418 bool validateRenderingState(const char*);
424 419
425 bool validateWebGLObject(const char*, WebGLObject*); 420 bool validateWebGLObject(const char*, WebGLObject*);
426 421
427 // Adds a compressed texture format. 422 // Adds a compressed texture format.
428 void addCompressedTextureFormat(GLenum); 423 void addCompressedTextureFormat(GLenum);
429 void removeAllCompressedTextureFormats(); 424 void removeAllCompressedTextureFormats();
430 425
431 PassRefPtr<Image> drawImageIntoBuffer(Image*, int width, int height, const c har* functionName); 426 PassRefPtr<Image> drawImageIntoBuffer(Image*, int width, int height, const c har* functionName);
432 427
433 PassRefPtr<Image> videoFrameToImage(HTMLVideoElement*, BackingStoreCopy);
434
435 WebGLRenderbuffer* ensureEmulatedStencilBuffer(GLenum target, WebGLRenderbuf fer*); 428 WebGLRenderbuffer* ensureEmulatedStencilBuffer(GLenum target, WebGLRenderbuf fer*);
436 429
437 // Structure for rendering to a DrawingBuffer, instead of directly 430 // Structure for rendering to a DrawingBuffer, instead of directly
438 // to the back-buffer of m_context. 431 // to the back-buffer of m_context.
439 #if ENABLE(OILPAN) 432 #if ENABLE(OILPAN)
440 RefPtr<WebGLSharedWebGraphicsContext3D> m_sharedWebGraphicsContext3D; 433 RefPtr<WebGLSharedWebGraphicsContext3D> m_sharedWebGraphicsContext3D;
441 #else 434 #else
442 RefPtr<DrawingBuffer> m_drawingBuffer; 435 RefPtr<DrawingBuffer> m_drawingBuffer;
443 #endif 436 #endif
444 DrawingBuffer* drawingBuffer() const; 437 DrawingBuffer* drawingBuffer() const;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 enum TexFuncValidationFunctionType { 759 enum TexFuncValidationFunctionType {
767 NotTexSubImage2D, 760 NotTexSubImage2D,
768 TexSubImage2D, 761 TexSubImage2D,
769 }; 762 };
770 763
771 enum TexFuncValidationSourceType { 764 enum TexFuncValidationSourceType {
772 SourceArrayBufferView, 765 SourceArrayBufferView,
773 SourceImageData, 766 SourceImageData,
774 SourceHTMLImageElement, 767 SourceHTMLImageElement,
775 SourceHTMLCanvasElement, 768 SourceHTMLCanvasElement,
776 SourceHTMLVideoElement,
777 }; 769 };
778 770
779 // Helper function for tex{Sub}Image2D to check if the input format/type/lev el/target/width/height/border/xoffset/yoffset are valid. 771 // Helper function for tex{Sub}Image2D to check if the input format/type/lev el/target/width/height/border/xoffset/yoffset are valid.
780 // Otherwise, it would return quickly without doing other work. 772 // Otherwise, it would return quickly without doing other work.
781 bool validateTexFunc(const char* functionName, TexFuncValidationFunctionType , TexFuncValidationSourceType, GLenum target, GLint level, GLenum internalformat , GLsizei width, 773 bool validateTexFunc(const char* functionName, TexFuncValidationFunctionType , TexFuncValidationSourceType, GLenum target, GLint level, GLenum internalformat , GLsizei width,
782 GLsizei height, GLint border, GLenum format, GLenum type, GLint xoffset, GLint yoffset); 774 GLsizei height, GLint border, GLenum format, GLenum type, GLint xoffset, GLint yoffset);
783 775
784 // Helper function to check input width and height for functions {copy, comp ressed}Tex{Sub}Image. 776 // Helper function to check input width and height for functions {copy, comp ressed}Tex{Sub}Image.
785 // Generates GL error and returns false if width or height is invalid. 777 // Generates GL error and returns false if width or height is invalid.
786 bool validateTexFuncDimensions(const char* functionName, TexFuncValidationFu nctionType, GLenum target, GLint level, GLsizei width, GLsizei height); 778 bool validateTexFuncDimensions(const char* functionName, TexFuncValidationFu nctionType, GLenum target, GLint level, GLsizei width, GLsizei height);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 // Helper function to validate the target for bufferData. 854 // Helper function to validate the target for bufferData.
863 // Return the current bound buffer to target, or 0 if the target is invalid. 855 // Return the current bound buffer to target, or 0 if the target is invalid.
864 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe t); 856 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe t);
865 857
866 // Helper function for tex{Sub}Image2D to make sure image is ready and would n't taint Origin. 858 // Helper function for tex{Sub}Image2D to make sure image is ready and would n't taint Origin.
867 bool validateHTMLImageElement(const char* functionName, HTMLImageElement*, E xceptionState&); 859 bool validateHTMLImageElement(const char* functionName, HTMLImageElement*, E xceptionState&);
868 860
869 // Helper function for tex{Sub}Image2D to make sure canvas is ready and woul dn't taint Origin. 861 // Helper function for tex{Sub}Image2D to make sure canvas is ready and woul dn't taint Origin.
870 bool validateHTMLCanvasElement(const char* functionName, HTMLCanvasElement*, ExceptionState&); 862 bool validateHTMLCanvasElement(const char* functionName, HTMLCanvasElement*, ExceptionState&);
871 863
872 // Helper function for tex{Sub}Image2D to make sure video is ready wouldn't taint Origin.
873 bool validateHTMLVideoElement(const char* functionName, HTMLVideoElement*, E xceptionState&);
874
875 // Helper function to validate drawArrays(Instanced) calls 864 // Helper function to validate drawArrays(Instanced) calls
876 bool validateDrawArrays(const char* functionName, GLenum mode, GLint first, GLsizei count); 865 bool validateDrawArrays(const char* functionName, GLenum mode, GLint first, GLsizei count);
877 866
878 // Helper function to validate drawElements(Instanced) calls 867 // Helper function to validate drawElements(Instanced) calls
879 bool validateDrawElements(const char* functionName, GLenum mode, GLsizei cou nt, GLenum type, long long offset); 868 bool validateDrawElements(const char* functionName, GLenum mode, GLsizei cou nt, GLenum type, long long offset);
880 869
881 // Helper function to validate draw*Instanced calls 870 // Helper function to validate draw*Instanced calls
882 bool validateDrawInstanced(const char* functionName, GLsizei primcount); 871 bool validateDrawInstanced(const char* functionName, GLsizei primcount);
883 872
884 // Helper functions for vertexAttribNf{v}. 873 // Helper functions for vertexAttribNf{v}.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 static IntSize oldestContextSize(); 946 static IntSize oldestContextSize();
958 }; 947 };
959 948
960 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 949 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
961 950
962 } // namespace blink 951 } // namespace blink
963 952
964 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 953 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
965 954
966 #endif // WebGLRenderingContextBase_h 955 #endif // WebGLRenderingContextBase_h
OLDNEW
« no previous file with comments | « sky/engine/core/html/canvas/CanvasRenderingContext2D.idl ('k') | sky/engine/core/html/canvas/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698