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

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

Issue 1566283003: Upgrade blink side ReadPixels size validation to consider ES3 pack parameters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 TexSubImage3DByGPU 825 TexSubImage3DByGPU
826 }; 826 };
827 // Copy from the canvas element directly to the texture via the GPU, without a read-back to system memory. 827 // Copy from the canvas element directly to the texture via the GPU, without a read-back to system memory.
828 void texImageCanvasByGPU(TexImageByGPUType, WebGLTexture*, GLenum target, GL int level, 828 void texImageCanvasByGPU(TexImageByGPUType, WebGLTexture*, GLenum target, GL int level,
829 GLint internalformat, GLenum type, GLint xoffset, GLint yoffset, GLint z offset, HTMLCanvasElement*); 829 GLint internalformat, GLenum type, GLint xoffset, GLint yoffset, GLint z offset, HTMLCanvasElement*);
830 bool canUseTexImageCanvasByGPU(GLint internalformat, GLenum type); 830 bool canUseTexImageCanvasByGPU(GLint internalformat, GLenum type);
831 831
832 void handleTextureCompleteness(const char*, bool); 832 void handleTextureCompleteness(const char*, bool);
833 void createFallbackBlackTextures1x1(); 833 void createFallbackBlackTextures1x1();
834 834
835 virtual WebGLImageConversion::PixelStoreParams getPackPixelStoreParams();
836 virtual WebGLImageConversion::PixelStoreParams getUnpackPixelStoreParams();
837
835 // Helper function for copyTex{Sub}Image, check whether the internalformat 838 // Helper function for copyTex{Sub}Image, check whether the internalformat
836 // and the color buffer format of the current bound framebuffer combination 839 // and the color buffer format of the current bound framebuffer combination
837 // is valid. 840 // is valid.
838 bool isTexInternalFormatColorBufferCombinationValid(GLenum texInternalFormat , GLenum colorBufferFormat); 841 bool isTexInternalFormatColorBufferCombinationValid(GLenum texInternalFormat , GLenum colorBufferFormat);
839 842
840 // Helper function to get the bound framebuffer's color buffer format. 843 // Helper function to get the bound framebuffer's color buffer format.
841 virtual GLenum boundFramebufferColorFormat(); 844 virtual GLenum boundFramebufferColorFormat();
842 845
843 // Helper function to verify limits on the length of uniform and attribute l ocations. 846 // Helper function to verify limits on the length of uniform and attribute l ocations.
844 virtual unsigned getMaxWebGLLocationLength() const { return 256; } 847 virtual unsigned getMaxWebGLLocationLength() const { return 256; }
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 static WebGLRenderingContextBase* oldestEvictedContext(); 1115 static WebGLRenderingContextBase* oldestEvictedContext();
1113 }; 1116 };
1114 1117
1115 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 1118 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
1116 1119
1117 } // namespace blink 1120 } // namespace blink
1118 1121
1119 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 1122 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
1120 1123
1121 #endif // WebGLRenderingContextBase_h 1124 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698