| Index: gpu/command_buffer/common/gles2_cmd_utils.h
|
| diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h
|
| index c590b159594e9fbf3e595dc09877afaed4612d30..15f3b57e0a5516cef7ddf1882b95c00c53efa832 100644
|
| --- a/gpu/command_buffer/common/gles2_cmd_utils.h
|
| +++ b/gpu/command_buffer/common/gles2_cmd_utils.h
|
| @@ -156,8 +156,14 @@ class GLES2_UTILS_EXPORT GLES2Util {
|
| static uint32_t GetChannelsNeededForAttachmentType(
|
| int type, uint32_t max_color_attachments);
|
|
|
| + // Return true if value is neither a power of two nor zero.
|
| static bool IsNPOT(uint32_t value) {
|
| - return value > 0 && (value & (value - 1)) != 0;
|
| + return (value & (value - 1)) != 0;
|
| + }
|
| +
|
| + // Return true if value is a power of two or zero.
|
| + static bool IsPOT(uint32_t value) {
|
| + return (value & (value - 1)) == 0;
|
| }
|
|
|
| static std::string GetStringEnum(uint32_t value);
|
|
|