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

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

Issue 1494553002: Revert of Upgrade PixelStorei to ES3/WebGL2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 bool isContextLost() const override; 269 bool isContextLost() const override;
270 GLboolean isEnabled(GLenum cap); 270 GLboolean isEnabled(GLenum cap);
271 GLboolean isFramebuffer(WebGLFramebuffer*); 271 GLboolean isFramebuffer(WebGLFramebuffer*);
272 GLboolean isProgram(WebGLProgram*); 272 GLboolean isProgram(WebGLProgram*);
273 GLboolean isRenderbuffer(WebGLRenderbuffer*); 273 GLboolean isRenderbuffer(WebGLRenderbuffer*);
274 GLboolean isShader(WebGLShader*); 274 GLboolean isShader(WebGLShader*);
275 GLboolean isTexture(WebGLTexture*); 275 GLboolean isTexture(WebGLTexture*);
276 276
277 void lineWidth(GLfloat); 277 void lineWidth(GLfloat);
278 void linkProgram(WebGLProgram*); 278 void linkProgram(WebGLProgram*);
279 virtual void pixelStorei(GLenum pname, GLint param); 279 void pixelStorei(GLenum pname, GLint param);
280 void polygonOffset(GLfloat factor, GLfloat units); 280 void polygonOffset(GLfloat factor, GLfloat units);
281 virtual void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLe num format, GLenum type, DOMArrayBufferView* pixels); 281 virtual void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLe num format, GLenum type, DOMArrayBufferView* pixels);
282 void renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width , GLsizei height); 282 void renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width , GLsizei height);
283 void sampleCoverage(GLfloat value, GLboolean invert); 283 void sampleCoverage(GLfloat value, GLboolean invert);
284 void scissor(GLint x, GLint y, GLsizei width, GLsizei height); 284 void scissor(GLint x, GLint y, GLsizei width, GLsizei height);
285 void shaderSource(WebGLShader*, const String&); 285 void shaderSource(WebGLShader*, const String&);
286 void stencilFunc(GLenum func, GLint ref, GLuint mask); 286 void stencilFunc(GLenum func, GLint ref, GLuint mask);
287 void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); 287 void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
288 void stencilMask(GLuint); 288 void stencilMask(GLuint);
289 void stencilMaskSeparate(GLenum face, GLuint mask); 289 void stencilMaskSeparate(GLenum face, GLuint mask);
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 480
481 // Check if each enabled vertex attribute is bound to a buffer. 481 // Check if each enabled vertex attribute is bound to a buffer.
482 bool validateRenderingState(const char*); 482 bool validateRenderingState(const char*);
483 483
484 bool validateWebGLObject(const char*, WebGLObject*); 484 bool validateWebGLObject(const char*, WebGLObject*);
485 485
486 // Adds a compressed texture format. 486 // Adds a compressed texture format.
487 void addCompressedTextureFormat(GLenum); 487 void addCompressedTextureFormat(GLenum);
488 void removeAllCompressedTextureFormats(); 488 void removeAllCompressedTextureFormats();
489 489
490 // Set UNPACK_ALIGNMENT to 1, all other parameters to 0.
491 virtual void resetUnpackParameters();
492 // Restore the client unpack parameters.
493 virtual void restoreUnpackParameters();
494
495 PassRefPtr<Image> drawImageIntoBuffer(PassRefPtr<Image>, int width, int heig ht, const char* functionName); 490 PassRefPtr<Image> drawImageIntoBuffer(PassRefPtr<Image>, int width, int heig ht, const char* functionName);
496 491
497 PassRefPtr<Image> videoFrameToImage(HTMLVideoElement*); 492 PassRefPtr<Image> videoFrameToImage(HTMLVideoElement*);
498 493
499 WebGLRenderbuffer* ensureEmulatedStencilBuffer(GLenum target, WebGLRenderbuf fer*); 494 WebGLRenderbuffer* ensureEmulatedStencilBuffer(GLenum target, WebGLRenderbuf fer*);
500 495
501 // Structure for rendering to a DrawingBuffer, instead of directly 496 // Structure for rendering to a DrawingBuffer, instead of directly
502 // to the back-buffer of m_context. 497 // to the back-buffer of m_context.
503 RefPtr<DrawingBuffer> m_drawingBuffer; 498 RefPtr<DrawingBuffer> m_drawingBuffer;
504 DrawingBuffer* drawingBuffer() const; 499 DrawingBuffer* drawingBuffer() const;
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 static WebGLRenderingContextBase* oldestEvictedContext(); 1132 static WebGLRenderingContextBase* oldestEvictedContext();
1138 }; 1133 };
1139 1134
1140 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 1135 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
1141 1136
1142 } // namespace blink 1137 } // namespace blink
1143 1138
1144 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 1139 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
1145 1140
1146 #endif // WebGLRenderingContextBase_h 1141 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698