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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_autogen.h

Issue 169603002: Add initial support for NV_path_rendering extension to gpu command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 2837 matching lines...) Expand 10 before | Expand all | Expand 10 after
2848 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glDrawBuffersEXT", "count < 0"); 2848 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glDrawBuffersEXT", "count < 0");
2849 return error::kNoError; 2849 return error::kNoError;
2850 } 2850 }
2851 if (bufs == NULL) { 2851 if (bufs == NULL) {
2852 return error::kOutOfBounds; 2852 return error::kOutOfBounds;
2853 } 2853 }
2854 DoDrawBuffersEXT(count, bufs); 2854 DoDrawBuffersEXT(count, bufs);
2855 return error::kNoError; 2855 return error::kNoError;
2856 } 2856 }
2857 2857
2858 error::Error GLES2DecoderImpl::HandleMatrixLoadfCHROMIUMImmediate(
2859 uint32_t immediate_data_size,
2860 const gles2::cmds::MatrixLoadfCHROMIUMImmediate& c) {
2861 if (!features().chromium_path_rendering) {
2862 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
2863 "glMatrixLoadfCHROMIUM",
2864 "function not available");
2865 return error::kNoError;
2866 }
2867
2868 GLenum matrixMode = static_cast<GLenum>(c.matrixMode);
2869 uint32_t data_size;
2870 if (!ComputeDataSize(1, sizeof(GLfloat), 16, &data_size)) {
2871 return error::kOutOfBounds;
2872 }
2873 if (data_size > immediate_data_size) {
2874 return error::kOutOfBounds;
2875 }
2876 const GLfloat* m =
2877 GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
2878 if (!validators_->matrix_mode.IsValid(matrixMode)) {
2879 LOCAL_SET_GL_ERROR_INVALID_ENUM(
2880 "glMatrixLoadfCHROMIUM", matrixMode, "matrixMode");
2881 return error::kNoError;
2882 }
2883 if (m == NULL) {
2884 return error::kOutOfBounds;
2885 }
2886 DoMatrixLoadfCHROMIUM(matrixMode, m);
2887 return error::kNoError;
2888 }
2889
2890 error::Error GLES2DecoderImpl::HandleMatrixLoadIdentityCHROMIUM(
2891 uint32_t immediate_data_size,
2892 const gles2::cmds::MatrixLoadIdentityCHROMIUM& c) {
2893 if (!features().chromium_path_rendering) {
2894 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
2895 "glMatrixLoadIdentityCHROMIUM",
2896 "function not available");
2897 return error::kNoError;
2898 }
2899
2900 GLenum matrixMode = static_cast<GLenum>(c.matrixMode);
2901 if (!validators_->matrix_mode.IsValid(matrixMode)) {
2902 LOCAL_SET_GL_ERROR_INVALID_ENUM(
2903 "glMatrixLoadIdentityCHROMIUM", matrixMode, "matrixMode");
2904 return error::kNoError;
2905 }
2906 DoMatrixLoadIdentityCHROMIUM(matrixMode);
2907 return error::kNoError;
2908 }
2909
2858 bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) { 2910 bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) {
2859 switch (cap) { 2911 switch (cap) {
2860 case GL_BLEND: 2912 case GL_BLEND:
2861 state_.enable_flags.blend = enabled; 2913 state_.enable_flags.blend = enabled;
2862 if (state_.enable_flags.cached_blend != enabled || 2914 if (state_.enable_flags.cached_blend != enabled ||
2863 state_.ignore_cached_state) { 2915 state_.ignore_cached_state) {
2864 state_.enable_flags.cached_blend = enabled; 2916 state_.enable_flags.cached_blend = enabled;
2865 return true; 2917 return true;
2866 } 2918 }
2867 return false; 2919 return false;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2926 state_.ignore_cached_state) { 2978 state_.ignore_cached_state) {
2927 framebuffer_state_.clear_state_dirty = true; 2979 framebuffer_state_.clear_state_dirty = true;
2928 } 2980 }
2929 return false; 2981 return false;
2930 default: 2982 default:
2931 NOTREACHED(); 2983 NOTREACHED();
2932 return false; 2984 return false;
2933 } 2985 }
2934 } 2986 }
2935 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 2987 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698