OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 contains the ContextState class. | 5 // This file contains the ContextState class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
8 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 return bound_texture_external_oes; | 57 return bound_texture_external_oes; |
58 case GL_SAMPLER_2D_RECT_ARB: | 58 case GL_SAMPLER_2D_RECT_ARB: |
59 return bound_texture_rectangle_arb; | 59 return bound_texture_rectangle_arb; |
60 } | 60 } |
61 | 61 |
62 NOTREACHED(); | 62 NOTREACHED(); |
63 return NULL; | 63 return NULL; |
64 } | 64 } |
65 | 65 |
66 void Unbind(TextureManager::TextureInfo* texture) { | 66 void Unbind(TextureManager::TextureInfo* texture) { |
67 if (bound_texture_2d == texture) { | 67 if (bound_texture_2d.get() == texture) { |
68 bound_texture_2d = NULL; | 68 bound_texture_2d = NULL; |
69 } | 69 } |
70 if (bound_texture_cube_map == texture) { | 70 if (bound_texture_cube_map.get() == texture) { |
71 bound_texture_cube_map = NULL; | 71 bound_texture_cube_map = NULL; |
72 } | 72 } |
73 if (bound_texture_external_oes == texture) { | 73 if (bound_texture_external_oes.get() == texture) { |
74 bound_texture_external_oes = NULL; | 74 bound_texture_external_oes = NULL; |
75 } | 75 } |
76 } | 76 } |
77 }; | 77 }; |
78 | 78 |
79 | 79 |
80 struct GPU_EXPORT ContextState { | 80 struct GPU_EXPORT ContextState { |
81 ContextState(); | 81 ContextState(); |
82 ~ContextState(); | 82 ~ContextState(); |
83 | 83 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 GLenum hint_fragment_shader_derivative; | 131 GLenum hint_fragment_shader_derivative; |
132 | 132 |
133 bool pack_reverse_row_order; | 133 bool pack_reverse_row_order; |
134 }; | 134 }; |
135 | 135 |
136 } // namespace gles2 | 136 } // namespace gles2 |
137 } // namespace gpu | 137 } // namespace gpu |
138 | 138 |
139 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 139 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
140 | 140 |
OLD | NEW |