cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / gpu / command_buffer / client / client_context_state_impl_autogen.h
blob150816d04e3ba5a51a85caa0163bdb0f1756b8a6
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // DO NOT EDIT!
9 // It is included by client_context_state.cc
10 #ifndef GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_IMPL_AUTOGEN_H_
11 #define GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_IMPL_AUTOGEN_H_
13 ClientContextState::EnableFlags::EnableFlags()
14 : blend(false),
15 cull_face(false),
16 depth_test(false),
17 dither(true),
18 polygon_offset_fill(false),
19 sample_alpha_to_coverage(false),
20 sample_coverage(false),
21 scissor_test(false),
22 stencil_test(false) {
26 bool ClientContextState::SetCapabilityState(
27 GLenum cap, bool enabled, bool* changed) {
28 *changed = false;
29 switch (cap) {
30 case GL_BLEND:
31 if (enable_flags.blend != enabled) {
32 *changed = true;
33 enable_flags.blend = enabled;
35 return true;
36 case GL_CULL_FACE:
37 if (enable_flags.cull_face != enabled) {
38 *changed = true;
39 enable_flags.cull_face = enabled;
41 return true;
42 case GL_DEPTH_TEST:
43 if (enable_flags.depth_test != enabled) {
44 *changed = true;
45 enable_flags.depth_test = enabled;
47 return true;
48 case GL_DITHER:
49 if (enable_flags.dither != enabled) {
50 *changed = true;
51 enable_flags.dither = enabled;
53 return true;
54 case GL_POLYGON_OFFSET_FILL:
55 if (enable_flags.polygon_offset_fill != enabled) {
56 *changed = true;
57 enable_flags.polygon_offset_fill = enabled;
59 return true;
60 case GL_SAMPLE_ALPHA_TO_COVERAGE:
61 if (enable_flags.sample_alpha_to_coverage != enabled) {
62 *changed = true;
63 enable_flags.sample_alpha_to_coverage = enabled;
65 return true;
66 case GL_SAMPLE_COVERAGE:
67 if (enable_flags.sample_coverage != enabled) {
68 *changed = true;
69 enable_flags.sample_coverage = enabled;
71 return true;
72 case GL_SCISSOR_TEST:
73 if (enable_flags.scissor_test != enabled) {
74 *changed = true;
75 enable_flags.scissor_test = enabled;
77 return true;
78 case GL_STENCIL_TEST:
79 if (enable_flags.stencil_test != enabled) {
80 *changed = true;
81 enable_flags.stencil_test = enabled;
83 return true;
84 default:
85 return false;
88 bool ClientContextState::GetEnabled(
89 GLenum cap, bool* enabled) const {
90 switch (cap) {
91 case GL_BLEND:
92 *enabled = enable_flags.blend;
93 return true;
94 case GL_CULL_FACE:
95 *enabled = enable_flags.cull_face;
96 return true;
97 case GL_DEPTH_TEST:
98 *enabled = enable_flags.depth_test;
99 return true;
100 case GL_DITHER:
101 *enabled = enable_flags.dither;
102 return true;
103 case GL_POLYGON_OFFSET_FILL:
104 *enabled = enable_flags.polygon_offset_fill;
105 return true;
106 case GL_SAMPLE_ALPHA_TO_COVERAGE:
107 *enabled = enable_flags.sample_alpha_to_coverage;
108 return true;
109 case GL_SAMPLE_COVERAGE:
110 *enabled = enable_flags.sample_coverage;
111 return true;
112 case GL_SCISSOR_TEST:
113 *enabled = enable_flags.scissor_test;
114 return true;
115 case GL_STENCIL_TEST:
116 *enabled = enable_flags.stencil_test;
117 return true;
118 default:
119 return false;
122 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_IMPL_AUTOGEN_H_