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

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

Issue 2212163002: Add some plumbing for the color management of canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 3 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebGL2RenderingContextBase_h 5 #ifndef WebGL2RenderingContextBase_h
6 #define WebGL2RenderingContextBase_h 6 #define WebGL2RenderingContextBase_h
7 7
8 #include "modules/webgl/WebGLExtension.h" 8 #include "modules/webgl/WebGLExtension.h"
9 #include "modules/webgl/WebGLRenderingContextBase.h" 9 #include "modules/webgl/WebGLRenderingContextBase.h"
10 #include <memory> 10 #include <memory>
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname) overr ide; 223 ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname) overr ide;
224 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G Lenum attachment, GLenum pname) override; 224 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G Lenum attachment, GLenum pname) override;
225 void pixelStorei(GLenum pname, GLint param) override; 225 void pixelStorei(GLenum pname, GLint param) override;
226 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum form at, GLenum type, DOMArrayBufferView* pixels) override; 226 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum form at, GLenum type, DOMArrayBufferView* pixels) override;
227 void restoreCurrentFramebuffer() override; 227 void restoreCurrentFramebuffer() override;
228 228
229 EAGERLY_FINALIZE(); 229 EAGERLY_FINALIZE();
230 DECLARE_VIRTUAL_TRACE(); 230 DECLARE_VIRTUAL_TRACE();
231 231
232 protected: 232 protected:
233 WebGL2RenderingContextBase(HTMLCanvasElement*, std::unique_ptr<WebGraphicsCo ntext3DProvider>, const WebGLContextAttributes& requestedAttributes); 233 WebGL2RenderingContextBase(HTMLCanvasElement*, std::unique_ptr<WebGraphicsCo ntext3DProvider>, const CanvasContextCreationAttributes& requestedAttributes);
234 234
235 // Helper function to validate target and the attachment combination for get FramebufferAttachmentParameters. 235 // Helper function to validate target and the attachment combination for get FramebufferAttachmentParameters.
236 // Generate GL error and return false if parameters are illegal. 236 // Generate GL error and return false if parameters are illegal.
237 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName, GLenum target, GLenum attachment); 237 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName, GLenum target, GLenum attachment);
238 238
239 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le ngth); 239 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le ngth);
240 240
241 enum TexStorageType { 241 enum TexStorageType {
242 TexStorageType2D, 242 TexStorageType2D,
243 TexStorageType3D, 243 TexStorageType3D,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 ScopedPersistent<v8::Array> m_queryWrappers; 328 ScopedPersistent<v8::Array> m_queryWrappers;
329 }; 329 };
330 330
331 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, 331 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context,
332 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, 332 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2,
333 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ; 333 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ;
334 334
335 } // namespace blink 335 } // namespace blink
336 336
337 #endif 337 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698