webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
renderergl_utils.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2012-2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 // renderergl_utils.h: Conversion functions and other utility routines
8 // specific to the OpenGL renderer.
9 
10 #ifndef LIBANGLE_RENDERER_GL_RENDERERGLUTILS_H_
11 #define LIBANGLE_RENDERER_GL_RENDERERGLUTILS_H_
12 
13 #include "libANGLE/angletypes.h"
14 #include "libANGLE/Error.h"
16 
17 #include <string>
18 #include <vector>
19 
20 namespace gl
21 {
22 struct Caps;
23 class TextureCapsMap;
24 struct Extensions;
25 struct Version;
26 }
27 
28 namespace rx
29 {
30 class FunctionsGL;
31 struct WorkaroundsGL;
32 
33 VendorID GetVendorID(const FunctionsGL *functions);
34 std::string GetDriverVersion(const FunctionsGL *functions);
35 
36 namespace nativegl_gl
37 {
38 
39 void GenerateCaps(const FunctionsGL *functions, gl::Caps *caps, gl::TextureCapsMap *textureCapsMap,
40  gl::Extensions *extensions, gl::Version *maxSupportedESVersion);
41 
42 void GenerateWorkarounds(const FunctionsGL *functions, WorkaroundsGL *workarounds);
43 }
44 
45 bool CanMapBufferForRead(const FunctionsGL *functions);
46 uint8_t *MapBufferRangeWithFallback(const FunctionsGL *functions,
47  GLenum target,
48  size_t offset,
49  size_t length,
51 
54  GLenum format,
55  GLenum type,
56  bool is3D,
57  const void *pixels);
58 }
59 
60 #endif // LIBANGLE_RENDERER_GL_RENDERERGLUTILS_H_
void GenerateCaps(ID3D11Device *device, ID3D11DeviceContext *deviceContext, const Renderer11DeviceCaps &renderer11DeviceCaps, gl::Caps *caps, gl::TextureCapsMap *textureCapsMap, gl::Extensions *extensions, gl::Limitations *limitations)
Definition: renderer11_utils.cpp:1046
VendorID GetVendorID(const FunctionsGL *functions)
Definition: renderergl_utils.cpp:29
EGLStreamKHR EGLint EGLint EGLint size
Definition: eglext.h:984
gl::ErrorOrResult< bool > ShouldApplyLastRowPaddingWorkaround(const gl::Extents &size, const gl::PixelStoreStateBase &state, GLenum format, GLenum type, bool is3D, const void *pixels)
Definition: renderergl_utils.cpp:977
GLint GLint GLint GLsizei GLsizei GLenum format
Definition: gl2.h:403
Definition: Version.h:17
EGLContext EGLenum target
Definition: eglext.h:192
VendorID
Definition: angletypes.h:249
unsigned int GLenum
Definition: gl2.h:69
Definition: angletypes.h:82
char Version[]
Definition: dry.c:116
GLint GLsizei GLsizei GLenum GLenum void * pixels
Definition: gl2.h:473
uint8_t * MapBufferRangeWithFallback(const FunctionsGL *functions, GLenum target, size_t offset, size_t length, GLbitfield access)
Definition: renderergl_utils.cpp:931
EGLStreamKHR EGLint EGLint offset
Definition: eglext.h:984
Definition: mathutil.h:804
unsigned char uint8_t
Definition: ptypes.h:89
Definition: angletypes.h:200
Definition: Caps.h:48
EGLenum type
Definition: eglext.h:63
GLsizei const GLchar *const * string
Definition: gl2.h:479
Definition: Caps.h:379
WorkaroundsD3D GenerateWorkarounds(const Renderer11DeviceCaps &deviceCaps, const DXGI_ADAPTER_DESC &adapterDesc)
Definition: renderer11_utils.cpp:1820
std::string GetDriverVersion(const FunctionsGL *functions)
Definition: Error.h:52
unsigned int GLbitfield
Definition: gl2.h:75
Extensions
Definition: python_message.py:571
bool CanMapBufferForRead(const FunctionsGL *functions)
Definition: renderergl_utils.cpp:925
string state
Definition: buildtests.py:34
Definition: Caps.h:69
Definition: entry_points_gles_2_0.h:15
GLenum access
Definition: gl2ext.h:2317
GLuint GLsizei GLsizei * length
Definition: gl2.h:435