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

Unified Diff: gpu/command_buffer/service/context_state_impl_autogen.h

Issue 1218223005: command_buffer: Implement CHROMIUM_framebuffer_mixed_samples extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-05-path-fragment-input-gen
Patch Set: rebase for commit Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/context_state_autogen.h ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_state_impl_autogen.h
diff --git a/gpu/command_buffer/service/context_state_impl_autogen.h b/gpu/command_buffer/service/context_state_impl_autogen.h
index 263841bfc857a19edc11c9b9aa1d5f45e3decaef..aca47641866d1b1d93aca2131cabf226c57a3a31 100644
--- a/gpu/command_buffer/service/context_state_impl_autogen.h
+++ b/gpu/command_buffer/service/context_state_impl_autogen.h
@@ -65,6 +65,7 @@ void ContextState::Initialize() {
cached_color_mask_blue = true;
color_mask_alpha = true;
cached_color_mask_alpha = true;
+ coverage_modulation = GL_NONE;
cull_mode = GL_BACK;
depth_func = GL_LESS;
depth_mask = true;
@@ -274,6 +275,9 @@ void ContextState::InitState(const ContextState* prev_state) const {
(cached_color_mask_alpha != prev_state->cached_color_mask_alpha))
glColorMask(cached_color_mask_red, cached_color_mask_green,
cached_color_mask_blue, cached_color_mask_alpha);
+ if (feature_info_->feature_flags().chromium_framebuffer_mixed_samples)
+ if ((coverage_modulation != prev_state->coverage_modulation))
+ glCoverageModulationNV(coverage_modulation);
if ((cull_mode != prev_state->cull_mode))
glCullFace(cull_mode);
if ((depth_func != prev_state->depth_func))
@@ -416,6 +420,8 @@ void ContextState::InitState(const ContextState* prev_state) const {
glClearStencil(stencil_clear);
glColorMask(cached_color_mask_red, cached_color_mask_green,
cached_color_mask_blue, cached_color_mask_alpha);
+ if (feature_info_->feature_flags().chromium_framebuffer_mixed_samples)
+ glCoverageModulationNV(coverage_modulation);
glCullFace(cull_mode);
glDepthFunc(depth_func);
glDepthMask(cached_depth_mask);
@@ -593,6 +599,12 @@ bool ContextState::GetStateAsGLint(GLenum pname,
params[3] = static_cast<GLint>(color_mask_alpha);
}
return true;
+ case GL_COVERAGE_MODULATION_CHROMIUM:
+ *num_written = 1;
+ if (params) {
+ params[0] = static_cast<GLint>(coverage_modulation);
+ }
+ return true;
case GL_CULL_FACE_MODE:
*num_written = 1;
if (params) {
@@ -1025,6 +1037,12 @@ bool ContextState::GetStateAsGLfloat(GLenum pname,
params[3] = static_cast<GLfloat>(color_mask_alpha);
}
return true;
+ case GL_COVERAGE_MODULATION_CHROMIUM:
+ *num_written = 1;
+ if (params) {
+ params[0] = static_cast<GLfloat>(coverage_modulation);
+ }
+ return true;
case GL_CULL_FACE_MODE:
*num_written = 1;
if (params) {
« no previous file with comments | « gpu/command_buffer/service/context_state_autogen.h ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698