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

Unified Diff: gpu/command_buffer/service/framebuffer_manager.cc

Issue 1542513002: Switch to standard integer types in gpu/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/framebuffer_manager.cc
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc
index 6f84009b331180ef81e5ee4de5f79b5f2b019e9f..7400552bb52aec5780638798265f68517a8ee6d8 100644
--- a/gpu/command_buffer/service/framebuffer_manager.cc
+++ b/gpu/command_buffer/service/framebuffer_manager.cc
@@ -3,7 +3,12 @@
// found in the LICENSE file.
#include "gpu/command_buffer/service/framebuffer_manager.h"
+
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/stringprintf.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/service/framebuffer_completeness_cache.h"
@@ -69,10 +74,10 @@ class RenderbufferAttachment
}
bool ValidForAttachmentType(GLenum attachment_type,
- uint32 max_color_attachments) override {
- uint32 need = GLES2Util::GetChannelsNeededForAttachmentType(
+ uint32_t max_color_attachments) override {
+ uint32_t need = GLES2Util::GetChannelsNeededForAttachmentType(
attachment_type, max_color_attachments);
- uint32 have = GLES2Util::GetChannelsForFormat(internal_format());
+ uint32_t have = GLES2Util::GetChannelsForFormat(internal_format());
return (need & have) != 0;
}
@@ -187,16 +192,16 @@ class TextureAttachment
}
bool ValidForAttachmentType(GLenum attachment_type,
- uint32 max_color_attachments) override {
+ uint32_t max_color_attachments) override {
GLenum type = 0;
GLenum internal_format = 0;
if (!texture_ref_->texture()->GetLevelType(
target_, level_, &type, &internal_format)) {
return false;
}
- uint32 need = GLES2Util::GetChannelsNeededForAttachmentType(
+ uint32_t need = GLES2Util::GetChannelsNeededForAttachmentType(
attachment_type, max_color_attachments);
- uint32 have = GLES2Util::GetChannelsForFormat(internal_format);
+ uint32_t have = GLES2Util::GetChannelsForFormat(internal_format);
// Workaround for NVIDIA drivers that incorrectly expose these formats as
// renderable:
@@ -236,8 +241,8 @@ class TextureAttachment
};
FramebufferManager::FramebufferManager(
- uint32 max_draw_buffers,
- uint32 max_color_attachments,
+ uint32_t max_draw_buffers,
+ uint32_t max_color_attachments,
ContextType context_type,
const scoped_refptr<FramebufferCompletenessCache>&
framebuffer_combo_complete_cache)
@@ -306,7 +311,7 @@ Framebuffer::Framebuffer(
DCHECK_GT(manager->max_draw_buffers_, 0u);
draw_buffers_.reset(new GLenum[manager->max_draw_buffers_]);
draw_buffers_[0] = GL_COLOR_ATTACHMENT0;
- for (uint32 i = 1; i < manager->max_draw_buffers_; ++i)
+ for (uint32_t i = 1; i < manager->max_draw_buffers_; ++i)
draw_buffers_[i] = GL_NONE;
}
@@ -347,7 +352,7 @@ bool Framebuffer::HasUnclearedColorAttachments() const {
void Framebuffer::ChangeDrawBuffersHelper(bool recover) const {
scoped_ptr<GLenum[]> buffers(new GLenum[manager_->max_draw_buffers_]);
- for (uint32 i = 0; i < manager_->max_draw_buffers_; ++i)
+ for (uint32_t i = 0; i < manager_->max_draw_buffers_; ++i)
buffers[i] = GL_NONE;
for (AttachmentMap::const_iterator it = attachments_.begin();
it != attachments_.end(); ++it) {
@@ -358,7 +363,7 @@ void Framebuffer::ChangeDrawBuffersHelper(bool recover) const {
}
}
bool different = false;
- for (uint32 i = 0; i < manager_->max_draw_buffers_; ++i) {
+ for (uint32_t i = 0; i < manager_->max_draw_buffers_; ++i) {
if (buffers[i] != draw_buffers_[i]) {
different = true;
break;
@@ -570,7 +575,7 @@ void Framebuffer::SetDrawBuffers(GLsizei n, const GLenum* bufs) {
}
bool Framebuffer::HasAlphaMRT() const {
- for (uint32 i = 0; i < manager_->max_draw_buffers_; ++i) {
+ for (uint32_t i = 0; i < manager_->max_draw_buffers_; ++i) {
if (draw_buffers_[i] != GL_NONE) {
const Attachment* attachment = GetAttachment(draw_buffers_[i]);
if (!attachment)
@@ -585,7 +590,7 @@ bool Framebuffer::HasAlphaMRT() const {
bool Framebuffer::HasSameInternalFormatsMRT() const {
GLenum internal_format = 0;
- for (uint32 i = 0; i < manager_->max_draw_buffers_; ++i) {
+ for (uint32_t i = 0; i < manager_->max_draw_buffers_; ++i) {
if (draw_buffers_[i] != GL_NONE) {
const Attachment* attachment = GetAttachment(draw_buffers_[i]);
if (!attachment)
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.h ('k') | gpu/command_buffer/service/framebuffer_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698