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

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

Issue 660093004: Type conversion fixes, gpu/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/query_tracker.cc ('k') | gpu/command_buffer/service/program_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 20c4da8efce5dea9ded6e230dde087e69c9cf0b9..8c7737de73db6078819c6a03ff2391e6891782f0 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3131,7 +3131,7 @@ bool GLES2DecoderImpl::CheckFramebufferValid(
return false;
if (backbuffer_needs_clear_bits_) {
glClearColor(0, 0, 0, (GLES2Util::GetChannelsForFormat(
- offscreen_target_color_format_) & 0x0008) != 0 ? 0 : 1);
+ offscreen_target_color_format_) & 0x0008) != 0 ? 0 : 1.f);
state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glClearStencil(0);
state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask);
@@ -3695,7 +3695,7 @@ bool GLES2DecoderImpl::ResizeOffscreenFrameBuffer(const gfx::Size& size) {
{
ScopedFrameBufferBinder binder(this, offscreen_target_frame_buffer_->id());
glClearColor(0, 0, 0, (GLES2Util::GetChannelsForFormat(
- offscreen_target_color_format_) & 0x0008) != 0 ? 0 : 1);
+ offscreen_target_color_format_) & 0x0008) != 0 ? 0 : 1.f);
state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glClearStencil(0);
state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask);
@@ -7215,7 +7215,7 @@ error::Error GLES2DecoderImpl::HandleVertexAttribPointer(
GLuint indx = c.indx;
GLint size = c.size;
GLenum type = c.type;
- GLboolean normalized = c.normalized;
+ GLboolean normalized = static_cast<GLboolean>(c.normalized);
GLsizei stride = c.stride;
GLsizei offset = c.offset;
const void* ptr = reinterpret_cast<const void*>(offset);
@@ -7457,7 +7457,7 @@ error::Error GLES2DecoderImpl::HandleReadPixels(uint32 immediate_data_size,
GLsizei height = c.height;
GLenum format = c.format;
GLenum type = c.type;
- GLboolean async = c.async;
+ GLboolean async = static_cast<GLboolean>(c.async);
if (width < 0 || height < 0) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glReadPixels", "dimensions < 0");
return error::kNoError;
« no previous file with comments | « gpu/command_buffer/client/query_tracker.cc ('k') | gpu/command_buffer/service/program_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698