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

Side by Side Diff: command_buffer/common/cross/resource.h

Issue 200127: Made gyp file for command buffer libraries.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « command_buffer/common/cross/buffer_sync_api.h ('k') | command_buffer/common/cross/rpc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // texture formats, a block is 1x1 texels, but DXT* formats have 4x4 blocks. 190 // texture formats, a block is 1x1 texels, but DXT* formats have 4x4 blocks.
191 unsigned int GetBlockSizeX(Format format); 191 unsigned int GetBlockSizeX(Format format);
192 // Gets the y dimension of a texel block for a given texture format. For most 192 // Gets the y dimension of a texel block for a given texture format. For most
193 // texture formats, a block is 1x1 texels, but DXT* formats have 4x4 blocks. 193 // texture formats, a block is 1x1 texels, but DXT* formats have 4x4 blocks.
194 unsigned int GetBlockSizeY(Format format); 194 unsigned int GetBlockSizeY(Format format);
195 // Gets the dimension of a mipmap level given the dimension of the base 195 // Gets the dimension of a mipmap level given the dimension of the base
196 // level. Every mipmap level is half the size of the previous level, rounding 196 // level. Every mipmap level is half the size of the previous level, rounding
197 // down. 197 // down.
198 static unsigned int GetMipMapDimension(unsigned int base, 198 static unsigned int GetMipMapDimension(unsigned int base,
199 unsigned int level) { 199 unsigned int level) {
200 DCHECK_GT(base, 0); 200 DCHECK_GT(base, 0U);
201 return std::max(1U, base >> level); 201 return std::max(1U, base >> level);
202 } 202 }
203 } // namespace texture 203 } // namespace texture
204 204
205 namespace sampler { 205 namespace sampler {
206 enum AddressingMode { 206 enum AddressingMode {
207 WRAP, 207 WRAP,
208 MIRROR_REPEAT, 208 MIRROR_REPEAT,
209 CLAMP_TO_EDGE, 209 CLAMP_TO_EDGE,
210 CLAMP_TO_BORDER, 210 CLAMP_TO_BORDER,
211 NUM_ADDRESSING_MODE 211 NUM_ADDRESSING_MODE
212 }; 212 };
213 213
214 enum FilteringMode { 214 enum FilteringMode {
215 NONE, 215 NONE,
216 POINT, 216 POINT,
217 LINEAR, 217 LINEAR,
218 NUM_FILTERING_MODE 218 NUM_FILTERING_MODE
219 }; 219 };
220 } // namespace sampler 220 } // namespace sampler
221 221
222 } // namespace command_buffer 222 } // namespace command_buffer
223 } // namespace o3d 223 } // namespace o3d
224 224
225 #endif // O3D_COMMAND_BUFFER_COMMON_CROSS_RESOURCE_H_ 225 #endif // O3D_COMMAND_BUFFER_COMMON_CROSS_RESOURCE_H_
OLDNEW
« no previous file with comments | « command_buffer/common/cross/buffer_sync_api.h ('k') | command_buffer/common/cross/rpc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698