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

Side by Side Diff: command_buffer/service/cross/texture_utils.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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 unsigned int row_pitch; // number of bytes between 2 successive rows. 68 unsigned int row_pitch; // number of bytes between 2 successive rows.
69 unsigned int slice_size; // size in bytes of a slice of data. 69 unsigned int slice_size; // size in bytes of a slice of data.
70 unsigned int slice_pitch; // number of bytes between 2 successive slices. 70 unsigned int slice_pitch; // number of bytes between 2 successive slices.
71 unsigned int total_size; // total size of the data. 71 unsigned int total_size; // total size of the data.
72 bool packed; // indicates whether the data is tightly packed. 72 bool packed; // indicates whether the data is tightly packed.
73 }; 73 };
74 74
75 // Round a value up, so that it is divisible by the block size. 75 // Round a value up, so that it is divisible by the block size.
76 static inline unsigned int RoundToBlockSize(unsigned int base, 76 static inline unsigned int RoundToBlockSize(unsigned int base,
77 unsigned int block) { 77 unsigned int block) {
78 DCHECK_GT(base, 0); 78 DCHECK_GT(base, 0U);
79 DCHECK_GT(block, 0); 79 DCHECK_GT(block, 0U);
80 return block + base - 1 - (base - 1) % block; 80 return block + base - 1 - (base - 1) % block;
81 } 81 }
82 82
83 // Fills a MipLevelInfo structure from the base texture dimensions. 83 // Fills a MipLevelInfo structure from the base texture dimensions.
84 static inline void MakeMipLevelInfo(MipLevelInfo *mip_info, 84 static inline void MakeMipLevelInfo(MipLevelInfo *mip_info,
85 texture::Format format, 85 texture::Format format,
86 unsigned int base_width, 86 unsigned int base_width,
87 unsigned int base_height, 87 unsigned int base_height,
88 unsigned int base_depth, 88 unsigned int base_depth,
89 unsigned int level) { 89 unsigned int level) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 const MipLevelInfo &mip_level, 149 const MipLevelInfo &mip_level,
150 const TransferInfo &dst_transfer_info, 150 const TransferInfo &dst_transfer_info,
151 void *dst_data, 151 void *dst_data,
152 const TransferInfo &src_transfer_info, 152 const TransferInfo &src_transfer_info,
153 const void *src_data); 153 const void *src_data);
154 154
155 } // namespace command_buffer 155 } // namespace command_buffer
156 } // namespace o3d 156 } // namespace o3d
157 157
158 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_TEXTURE_UTILS_H_ 158 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_TEXTURE_UTILS_H_
OLDNEW
« no previous file with comments | « command_buffer/service/cross/gapi_decoder.cc ('k') | command_buffer/service/win/d3d9/geometry_d3d9.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698