| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| index a2822fc7e4816cc7e4b4db4e180dbd0c6e3b23ef..b1a158af9dbfcb4fd39e4a255b84bc1bd7ce443e 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -48,6 +48,7 @@
|
| #include "gpu/command_buffer/service/image_manager.h"
|
| #include "gpu/command_buffer/service/mailbox_manager.h"
|
| #include "gpu/command_buffer/service/memory_tracking.h"
|
| +#include "gpu/command_buffer/service/path_manager.h"
|
| #include "gpu/command_buffer/service/program_manager.h"
|
| #include "gpu/command_buffer/service/query_manager.h"
|
| #include "gpu/command_buffer/service/renderbuffer_manager.h"
|
| @@ -739,6 +740,8 @@ class GLES2DecoderImpl : public GLES2Decoder,
|
| void DeleteQueriesEXTHelper(GLsizei n, const GLuint* client_ids);
|
| bool GenVertexArraysOESHelper(GLsizei n, const GLuint* client_ids);
|
| void DeleteVertexArraysOESHelper(GLsizei n, const GLuint* client_ids);
|
| + bool GenPathsCHROMIUMHelper(GLsizei range, const GLuint* client_ids);
|
| + void DeletePathsCHROMIUMHelper(GLuint path, GLsizei range);
|
|
|
| // Helper for async upload token completion notification callback.
|
| base::Closure AsyncUploadTokenCompletionClosure(uint32 async_upload_token,
|
| @@ -764,6 +767,8 @@ class GLES2DecoderImpl : public GLES2Decoder,
|
| return group_->framebuffer_manager();
|
| }
|
|
|
| + PathManager* path_manager() { return group_->path_manager(); }
|
| +
|
| ProgramManager* program_manager() {
|
| return group_->program_manager();
|
| }
|
| @@ -828,6 +833,8 @@ class GLES2DecoderImpl : public GLES2Decoder,
|
| texture_manager()->RemoveTexture(client_id);
|
| }
|
|
|
| + GLuint GetPath(GLuint client_id, error::Error* path_error);
|
| +
|
| // Get the size (in pixels) of the currently bound frame buffer (either FBO
|
| // or regular back buffer).
|
| gfx::Size GetBoundReadFrameBufferSize();
|
| @@ -1628,6 +1635,16 @@ class GLES2DecoderImpl : public GLES2Decoder,
|
| void ProcessPendingReadPixels();
|
| void FinishReadPixels(const cmds::ReadPixels& c, GLuint buffer);
|
|
|
| + error::Error PrepareInstancedPathCommand(uint32 num_paths,
|
| + uint32 paths_shm_id,
|
| + uint32 paths_shm_offset,
|
| + GLuint path_base,
|
| + GLenum transform_type,
|
| + uint32 transforms_shm_id,
|
| + uint32 transforms_shm_offset,
|
| + GLuint** out_paths,
|
| + const GLfloat** out_transforms);
|
| +
|
| // Generate a member function prototype for each command in an automated and
|
| // typesafe way.
|
| #define GLES2_CMD_OP(name) \
|
| @@ -2758,6 +2775,14 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() {
|
| #if (ANGLE_SH_VERSION >= 123)
|
| resources.EXT_shader_texture_lod =
|
| features().ext_shader_texture_lod ? 1 : 0;
|
| +#if (ANGLE_SH_VERSION >= 124)
|
| + if (features().chromium_path_rendering) {
|
| + resources.CHROMIUM_path_rendering = 1;
|
| + GLint value = 0;
|
| + glGetIntegerv(GL_MAX_TEXTURE_COORDS, &value);
|
| + resources.MaxTextureCoords = value;
|
| + }
|
| +#endif
|
| #endif
|
| }
|
|
|
| @@ -2870,6 +2895,25 @@ bool GLES2DecoderImpl::GenTexturesHelper(GLsizei n, const GLuint* client_ids) {
|
| return true;
|
| }
|
|
|
| +bool GLES2DecoderImpl::GenPathsCHROMIUMHelper(GLsizei range,
|
| + const GLuint* client_ids) {
|
| + for (GLsizei ii = 0; ii < range; ++ii) {
|
| + if (path_manager()->GetPath(client_ids[ii])) {
|
| + return false;
|
| + }
|
| + }
|
| +
|
| + GLuint n = glGenPathsNV(range);
|
| + for (GLsizei ii = 0; ii < range; ++ii) {
|
| + path_manager()->CreatePath(client_ids[ii], n + ii);
|
| + }
|
| + return true;
|
| +}
|
| +
|
| +void GLES2DecoderImpl::DeletePathsCHROMIUMHelper(GLuint path, GLsizei range) {
|
| + path_manager()->RemovePaths(path, range);
|
| +}
|
| +
|
| void GLES2DecoderImpl::DeleteBuffersHelper(
|
| GLsizei n, const GLuint* client_ids) {
|
| for (GLsizei ii = 0; ii < n; ++ii) {
|
| @@ -4342,6 +4386,12 @@ bool GLES2DecoderImpl::GetHelper(
|
| params[0] = renderbuffer_manager()->max_renderbuffer_size();
|
| }
|
| return true;
|
| + case GL_MAX_TEXTURE_COORDS:
|
| + *num_written = 1;
|
| + if (params) {
|
| + glGetIntegerv(GL_MAX_TEXTURE_COORDS, params);
|
| + }
|
| + return true;
|
| case GL_MAX_TEXTURE_SIZE:
|
| *num_written = 1;
|
| if (params) {
|
| @@ -10785,6 +10835,442 @@ void GLES2DecoderImpl::OnOutOfMemoryError() {
|
| }
|
| }
|
|
|
| +GLuint GLES2DecoderImpl::GetPath(GLuint client_id, error::Error* path_error) {
|
| + GLuint service_id = 0;
|
| + // FIXME: currently we do not create paths if they are not present.
|
| + if (!path_manager()->GetPath(client_id, &service_id)) {
|
| + *path_error = error::kInvalidArguments;
|
| + return 0;
|
| + }
|
| + return service_id;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandleGenPathsCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::GenPathsCHROMIUM& c) {
|
| + GLsizei range = static_cast<GLsizei>(c.range);
|
| + uint32 data_size;
|
| + if (!SafeMultiplyUint32(range, sizeof(GLuint), &data_size)) {
|
| + return error::kOutOfBounds;
|
| + }
|
| + GLuint* client_ids = GetSharedMemoryAs<GLuint*>(
|
| + c.client_ids_shm_id, c.client_ids_shm_offset, data_size);
|
| + if (client_ids == NULL) {
|
| + return error::kOutOfBounds;
|
| + }
|
| + if (!GenPathsCHROMIUMHelper(range, client_ids)) {
|
| + return error::kInvalidArguments;
|
| + }
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandlePathCommandsCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const cmds::PathCommandsCHROMIUM& c) {
|
| + error::Error path_error = error::kNoError;
|
| + GLuint service_id = GetPath(static_cast<GLuint>(c.path), &path_error);
|
| + if (path_error != error::kNoError) {
|
| + return path_error;
|
| + }
|
| +
|
| + GLsizei numCommands = static_cast<GLsizei>(c.numCommands);
|
| + uint32 commands_shm_id = static_cast<uint32>(c.commands_shm_id);
|
| + uint32 commands_shm_offset = static_cast<uint32>(c.commands_shm_offset);
|
| +
|
| + const GLubyte* commands = NULL;
|
| + if (commands_shm_id != 0 || commands_shm_offset != 0) {
|
| + commands = GetSharedMemoryAs<const GLubyte*>(
|
| + commands_shm_id, commands_shm_offset, numCommands);
|
| + if (!commands) {
|
| + return error::kOutOfBounds;
|
| + }
|
| + }
|
| +
|
| + GLenum coordType = static_cast<GLenum>(c.coordType);
|
| + GLsizei numCoords = static_cast<GLsizei>(c.numCoords);
|
| + uint32 coords_shm_id = static_cast<uint32>(c.coords_shm_id);
|
| + uint32 coords_shm_offset = static_cast<uint32>(c.coords_shm_offset);
|
| + uint32 coords_size =
|
| + GLES2Util::GetGLTypeSizeForTexturesAndBuffers(coordType) * numCoords;
|
| +
|
| + const void* coords = NULL;
|
| + if (coords_shm_id != 0 || coords_shm_offset != 0) {
|
| + coords = GetSharedMemoryAs<const void*>(
|
| + coords_shm_id, coords_shm_offset, coords_size);
|
| + if (!coords) {
|
| + return error::kOutOfBounds;
|
| + }
|
| + }
|
| +
|
| + glPathCommandsNV(
|
| + service_id, numCommands, commands, numCoords, coordType, coords);
|
| +
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandlePathParameterfCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::PathParameterfCHROMIUM& c) {
|
| + error::Error path_error = error::kNoError;
|
| + GLuint service_id = GetPath(static_cast<GLuint>(c.path), &path_error);
|
| + if (path_error != error::kNoError) {
|
| + return path_error;
|
| + }
|
| + GLenum pname = static_cast<GLenum>(c.pname);
|
| + GLfloat value = static_cast<GLfloat>(c.value);
|
| + glPathParameterfNV(service_id, pname, value);
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandlePathParameteriCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::PathParameteriCHROMIUM& c) {
|
| + error::Error path_error = error::kNoError;
|
| + GLuint service_id = GetPath(static_cast<GLuint>(c.path), &path_error);
|
| + if (path_error != error::kNoError) {
|
| + return path_error;
|
| + }
|
| + GLenum pname = static_cast<GLenum>(c.pname);
|
| + GLint value = static_cast<GLint>(c.value);
|
| + glPathParameteriNV(service_id, pname, value);
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandleStencilFillPathCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::StencilFillPathCHROMIUM& c) {
|
| + error::Error path_error = error::kNoError;
|
| + GLuint service_id = GetPath(static_cast<GLuint>(c.path), &path_error);
|
| + if (path_error != error::kNoError) {
|
| + return path_error;
|
| + }
|
| + GLenum fillMode = static_cast<GLenum>(c.fillMode);
|
| + GLuint mask = static_cast<GLuint>(c.mask);
|
| + ApplyDirtyState();
|
| + glStencilFillPathNV(service_id, fillMode, mask);
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::PrepareInstancedPathCommand(
|
| + uint32 num_paths,
|
| + uint32 paths_shm_id,
|
| + uint32 paths_shm_offset,
|
| + GLuint path_base,
|
| + GLenum transform_type,
|
| + uint32 transforms_shm_id,
|
| + uint32 transforms_shm_offset,
|
| + GLuint** out_paths,
|
| + const GLfloat** out_transforms) {
|
| + GLuint* paths = NULL;
|
| + if (paths_shm_id != 0 || paths_shm_offset != 0) {
|
| + paths = GetSharedMemoryAs<GLuint*>(
|
| + paths_shm_id, paths_shm_offset, sizeof(GLuint) * num_paths);
|
| + }
|
| + if (!paths) {
|
| + return error::kOutOfBounds;
|
| + }
|
| +
|
| + uint32 num_transform_elements =
|
| + GLES2Util::GetComponentCountForGLTransformType(transform_type) *
|
| + num_paths;
|
| +
|
| + const GLfloat* transforms = NULL;
|
| + if (transforms_shm_id != 0 || transforms_shm_offset != 0) {
|
| + transforms = GetSharedMemoryAs<const GLfloat*>(
|
| + transforms_shm_id,
|
| + transforms_shm_offset,
|
| + sizeof(GLfloat) * num_transform_elements);
|
| + }
|
| + if (!transforms) {
|
| + return error::kOutOfBounds;
|
| + }
|
| +
|
| + for (uint32_t i = 0; i < num_paths; ++i) {
|
| + error::Error path_error;
|
| + GLuint service_id = GetPath(paths[i] + path_base, &path_error);
|
| + // Will use path 0 if the path is not found. This is in line
|
| + // of the spec: missing paths will produce nothing, but does
|
| + // not stop the instanced draw.
|
| + paths[i] = service_id;
|
| + }
|
| +
|
| + DCHECK((reinterpret_cast<uintptr_t>(paths) & 0x3) == 0);
|
| + DCHECK((reinterpret_cast<uintptr_t>(transforms) & 0x3) == 0);
|
| +
|
| + *out_paths = paths;
|
| + *out_transforms = transforms;
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandleStencilFillPathInstancedCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::StencilFillPathInstancedCHROMIUM& c) {
|
| + TRACE_EVENT0("gpu",
|
| + "GLES2DecoderImpl::HandleStencilFillPathInstancedCHROMIUM");
|
| +
|
| + GLsizei numPaths = static_cast<GLsizei>(c.numPaths);
|
| + GLenum pathNameType = static_cast<GLenum>(c.pathNameType);
|
| + uint32 paths_shm_id = static_cast<uint32>(c.paths_shm_id);
|
| + uint32 paths_shm_offset = static_cast<uint32>(c.paths_shm_offset);
|
| + GLuint pathBase = static_cast<GLuint>(c.pathBase);
|
| + GLenum fillMode = static_cast<GLenum>(c.fillMode);
|
| + GLuint mask = static_cast<GLuint>(c.mask);
|
| + GLenum transformType = static_cast<GLenum>(c.transformType);
|
| + uint32 transforms_shm_id = static_cast<uint32>(c.transformValues_shm_id);
|
| + uint32 transforms_shm_offset =
|
| + static_cast<uint32>(c.transformValues_shm_offset);
|
| +
|
| + DCHECK(pathNameType == GL_UNSIGNED_INT);
|
| +
|
| + GLuint* paths;
|
| + const GLfloat* transforms;
|
| +
|
| + error::Error prepare_error =
|
| + PrepareInstancedPathCommand(static_cast<uint32_t>(numPaths),
|
| + paths_shm_id,
|
| + paths_shm_offset,
|
| + pathBase,
|
| + transformType,
|
| + transforms_shm_id,
|
| + transforms_shm_offset,
|
| + &paths,
|
| + &transforms);
|
| +
|
| + if (prepare_error != error::kNoError) {
|
| + return prepare_error;
|
| + }
|
| +
|
| + ApplyDirtyState();
|
| + glStencilFillPathInstancedNV(numPaths,
|
| + GL_UNSIGNED_INT,
|
| + paths,
|
| + 0,
|
| + fillMode,
|
| + mask,
|
| + transformType,
|
| + transforms);
|
| +
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandleStencilStrokePathCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::StencilStrokePathCHROMIUM& c) {
|
| + error::Error path_error = error::kNoError;
|
| + GLuint service_id = GetPath(static_cast<GLuint>(c.path), &path_error);
|
| + if (path_error != error::kNoError) {
|
| + return path_error;
|
| + }
|
| + GLint reference = static_cast<GLint>(c.reference);
|
| + GLuint mask = static_cast<GLuint>(c.mask);
|
| + ApplyDirtyState();
|
| + glStencilStrokePathNV(service_id, reference, mask);
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandleStencilStrokePathInstancedCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::StencilStrokePathInstancedCHROMIUM& c) {
|
| + TRACE_EVENT0("gpu",
|
| + "GLES2DecoderImpl::HandleStencilStrokePathInstancedCHROMIUM");
|
| +
|
| + GLsizei numPaths = static_cast<GLsizei>(c.numPaths);
|
| + GLenum pathNameType = static_cast<GLenum>(c.pathNameType);
|
| + uint32 paths_shm_id = static_cast<uint32>(c.paths_shm_id);
|
| + uint32 paths_shm_offset = static_cast<uint32>(c.paths_shm_offset);
|
| + GLuint pathBase = static_cast<GLuint>(c.pathBase);
|
| + GLuint ref = static_cast<GLuint>(c.ref);
|
| + GLuint mask = static_cast<GLuint>(c.mask);
|
| + GLenum transformType = static_cast<GLenum>(c.transformType);
|
| + uint32 transforms_shm_id = static_cast<uint32>(c.transformValues_shm_id);
|
| + uint32 transforms_shm_offset =
|
| + static_cast<uint32>(c.transformValues_shm_offset);
|
| +
|
| + DCHECK(pathNameType == GL_UNSIGNED_INT);
|
| +
|
| + GLuint* paths;
|
| + const GLfloat* transforms;
|
| +
|
| + error::Error prepare_error =
|
| + PrepareInstancedPathCommand(static_cast<uint32_t>(numPaths),
|
| + paths_shm_id,
|
| + paths_shm_offset,
|
| + pathBase,
|
| + transformType,
|
| + transforms_shm_id,
|
| + transforms_shm_offset,
|
| + &paths,
|
| + &transforms);
|
| +
|
| + if (prepare_error != error::kNoError) {
|
| + return prepare_error;
|
| + }
|
| +
|
| + ApplyDirtyState();
|
| + glStencilStrokePathInstancedNV(numPaths,
|
| + GL_UNSIGNED_INT,
|
| + paths,
|
| + 0,
|
| + ref,
|
| + mask,
|
| + transformType,
|
| + transforms);
|
| +
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandlePathTexGenCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::PathTexGenCHROMIUM& c) {
|
| + TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandlePathTexGenCHROMIUM");
|
| + GLenum texCoordSet = static_cast<GLenum>(c.texCoordSet);
|
| + GLenum genMode = static_cast<GLenum>(c.genMode);
|
| + GLint components = static_cast<GLint>(c.components);
|
| + uint32 buffer_shm_id = static_cast<uint32>(c.coeffs_shm_id);
|
| + uint32 buffer_shm_offset = static_cast<uint32>(c.coeffs_shm_offset);
|
| +
|
| + uint32 coeffs_size =
|
| + sizeof(GLfloat) * components * (genMode == GL_EYE_LINEAR ? 4 : 3);
|
| +
|
| + if (coeffs_size < 0) {
|
| + return error::kOutOfBounds;
|
| + }
|
| + const GLfloat* coeffs = NULL;
|
| + if (buffer_shm_id != 0 || buffer_shm_offset != 0) {
|
| + coeffs = GetSharedMemoryAs<const GLfloat*>(
|
| + buffer_shm_id, buffer_shm_offset, coeffs_size);
|
| + if (!coeffs) {
|
| + return error::kOutOfBounds;
|
| + }
|
| + }
|
| + glPathTexGenNV(texCoordSet, genMode, components, coeffs);
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandleCoverFillPathCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::CoverFillPathCHROMIUM& c) {
|
| + error::Error path_error = error::kNoError;
|
| + GLuint service_id = GetPath(static_cast<GLuint>(c.path), &path_error);
|
| + if (path_error != error::kNoError) {
|
| + return path_error;
|
| + }
|
| + GLenum coverMode = static_cast<GLenum>(c.coverMode);
|
| + ApplyDirtyState();
|
| + glCoverFillPathNV(service_id, coverMode);
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandleCoverFillPathInstancedCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::CoverFillPathInstancedCHROMIUM& c) {
|
| + TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandleCoverFillPathInstancedCHROMIUM");
|
| +
|
| + GLsizei numPaths = static_cast<GLsizei>(c.numPaths);
|
| + GLenum pathNameType = static_cast<GLenum>(c.pathNameType);
|
| + uint32 paths_shm_id = static_cast<uint32>(c.paths_shm_id);
|
| + uint32 paths_shm_offset = static_cast<uint32>(c.paths_shm_offset);
|
| + GLuint pathBase = static_cast<GLuint>(c.pathBase);
|
| + GLenum coverMode = static_cast<GLuint>(c.coverMode);
|
| + GLenum transformType = static_cast<GLenum>(c.transformType);
|
| + uint32 transforms_shm_id = static_cast<uint32>(c.transformValues_shm_id);
|
| + uint32 transforms_shm_offset =
|
| + static_cast<uint32>(c.transformValues_shm_offset);
|
| +
|
| + DCHECK(pathNameType == GL_UNSIGNED_INT);
|
| +
|
| + GLuint* paths;
|
| + const GLfloat* transforms;
|
| +
|
| + error::Error prepare_error =
|
| + PrepareInstancedPathCommand(static_cast<uint32_t>(numPaths),
|
| + paths_shm_id,
|
| + paths_shm_offset,
|
| + pathBase,
|
| + transformType,
|
| + transforms_shm_id,
|
| + transforms_shm_offset,
|
| + &paths,
|
| + &transforms);
|
| +
|
| + if (prepare_error != error::kNoError) {
|
| + return prepare_error;
|
| + }
|
| +
|
| + ApplyDirtyState();
|
| + glCoverFillPathInstancedNV(numPaths,
|
| + GL_UNSIGNED_INT,
|
| + paths,
|
| + 0,
|
| + coverMode,
|
| + transformType,
|
| + transforms);
|
| +
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandleCoverStrokePathCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::CoverStrokePathCHROMIUM& c) {
|
| + error::Error path_error = error::kNoError;
|
| + GLuint service_id = GetPath(static_cast<GLuint>(c.path), &path_error);
|
| + if (path_error != error::kNoError) {
|
| + return path_error;
|
| + }
|
| + GLenum coverMode = static_cast<GLenum>(c.coverMode);
|
| + ApplyDirtyState();
|
| + glCoverStrokePathNV(service_id, coverMode);
|
| + return error::kNoError;
|
| +}
|
| +
|
| +error::Error GLES2DecoderImpl::HandleCoverStrokePathInstancedCHROMIUM(
|
| + uint32 immediate_data_size,
|
| + const gles2::cmds::CoverStrokePathInstancedCHROMIUM& c) {
|
| + TRACE_EVENT0("gpu",
|
| + "GLES2DecoderImpl::HandleCoverStrokePathInstancedCHROMIUM");
|
| +
|
| + GLsizei numPaths = static_cast<GLsizei>(c.numPaths);
|
| + GLenum pathNameType = static_cast<GLenum>(c.pathNameType);
|
| + uint32 paths_shm_id = static_cast<uint32>(c.paths_shm_id);
|
| + uint32 paths_shm_offset = static_cast<uint32>(c.paths_shm_offset);
|
| + GLuint pathBase = static_cast<GLuint>(c.pathBase);
|
| + GLenum coverMode = static_cast<GLuint>(c.coverMode);
|
| + GLenum transformType = static_cast<GLenum>(c.transformType);
|
| + uint32 transforms_shm_id = static_cast<uint32>(c.transformValues_shm_id);
|
| + uint32 transforms_shm_offset =
|
| + static_cast<uint32>(c.transformValues_shm_offset);
|
| +
|
| + DCHECK(pathNameType == GL_UNSIGNED_INT);
|
| +
|
| + GLuint* paths;
|
| + const GLfloat* transforms;
|
| +
|
| + error::Error prepare_error =
|
| + PrepareInstancedPathCommand(static_cast<uint32_t>(numPaths),
|
| + paths_shm_id,
|
| + paths_shm_offset,
|
| + pathBase,
|
| + transformType,
|
| + transforms_shm_id,
|
| + transforms_shm_offset,
|
| + &paths,
|
| + &transforms);
|
| +
|
| + if (prepare_error != error::kNoError) {
|
| + return prepare_error;
|
| + }
|
| +
|
| + ApplyDirtyState();
|
| + glCoverStrokePathInstancedNV(numPaths,
|
| + GL_UNSIGNED_INT,
|
| + paths,
|
| + 0,
|
| + coverMode,
|
| + transformType,
|
| + transforms);
|
| + return error::kNoError;
|
| +}
|
| +
|
| // Include the auto-generated part of this file. We split this because it means
|
| // we can easily edit the non-auto generated parts right here in this file
|
| // instead of having to edit some template or the code generator.
|
|
|