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 #include "gpu/command_buffer/service/texture_definition.h" | 5 #include "gpu/command_buffer/service/texture_definition.h" |
6 | 6 |
7 namespace gpu { | 7 namespace gpu { |
8 namespace gles2 { | 8 namespace gles2 { |
9 | 9 |
10 TextureDefinition::LevelInfo::LevelInfo(GLenum target, | 10 TextureDefinition::LevelInfo::LevelInfo(GLenum target, |
11 GLenum internal_format, | 11 GLenum internal_format, |
12 GLsizei width, | 12 GLsizei width, |
13 GLsizei height, | 13 GLsizei height, |
14 GLsizei depth, | 14 GLsizei depth, |
15 GLint border, | 15 GLint border, |
16 GLenum format, | 16 GLenum format, |
17 GLenum type, | 17 GLenum type, |
18 bool cleared) | 18 bool cleared) |
19 : target(target), | 19 : target(target), |
20 internal_format(internal_format), | 20 internal_format(internal_format), |
21 width(width), | 21 width(width), |
22 height(height), | 22 height(height), |
23 depth(depth), | 23 depth(depth), |
24 border(border), | 24 border(border), |
25 format(format), | 25 format(format), |
26 type(type), | 26 type(type), |
27 cleared(cleared) { | 27 cleared(cleared) { |
28 } | 28 } |
29 | 29 |
30 TextureDefinition::LevelInfo::LevelInfo() | |
31 : target(0), | |
32 internal_format(0), | |
33 width(0), | |
34 height(0), | |
35 depth(0), | |
36 border(0), | |
37 format(0), | |
38 type(0), | |
39 cleared(true) { | |
40 } | |
41 | |
42 TextureDefinition::TextureDefinition(GLenum target, | 30 TextureDefinition::TextureDefinition(GLenum target, |
43 GLuint service_id, | 31 GLuint service_id, |
44 GLenum min_filter, | 32 GLenum min_filter, |
45 GLenum mag_filter, | 33 GLenum mag_filter, |
46 GLenum wrap_s, | 34 GLenum wrap_s, |
47 GLenum wrap_t, | 35 GLenum wrap_t, |
48 GLenum usage, | 36 GLenum usage, |
49 bool immutable, | 37 bool immutable, |
50 const LevelInfos& level_infos) | 38 const LevelInfos& level_infos) |
51 : target_(target), | 39 : target_(target), |
(...skipping 12 matching lines...) Expand all Loading... |
64 } | 52 } |
65 | 53 |
66 GLuint TextureDefinition::ReleaseServiceId() { | 54 GLuint TextureDefinition::ReleaseServiceId() { |
67 GLuint service_id = service_id_; | 55 GLuint service_id = service_id_; |
68 service_id_ = 0; | 56 service_id_ = 0; |
69 return service_id; | 57 return service_id; |
70 } | 58 } |
71 | 59 |
72 } // namespace gles2 | 60 } // namespace gles2 |
73 } // namespace gpu | 61 } // namespace gpu |
OLD | NEW |