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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1394403002: Mac Overlays: Plumb through GL solid color overlay support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 9236 matching lines...) Expand 10 before | Expand all | Expand 10 after
9247 image, 9247 image,
9248 gfx::Rect(c.bounds_x, c.bounds_y, c.bounds_width, c.bounds_height), 9248 gfx::Rect(c.bounds_x, c.bounds_y, c.bounds_width, c.bounds_height),
9249 gfx::RectF(c.uv_x, c.uv_y, c.uv_width, c.uv_height))) { 9249 gfx::RectF(c.uv_x, c.uv_y, c.uv_width, c.uv_height))) {
9250 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, 9250 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
9251 "glScheduleOverlayPlaneCHROMIUM", 9251 "glScheduleOverlayPlaneCHROMIUM",
9252 "failed to schedule overlay"); 9252 "failed to schedule overlay");
9253 } 9253 }
9254 return error::kNoError; 9254 return error::kNoError;
9255 } 9255 }
9256 9256
9257 error::Error GLES2DecoderImpl::HandleScheduleSolidColorOverlayPlaneCHROMIUM(
9258 uint32 immediate_data_size,
9259 const void* cmd_data) {
9260 const gles2::cmds::ScheduleSolidColorOverlayPlaneCHROMIUM& c =
9261 *static_cast<const gles2::cmds::ScheduleSolidColorOverlayPlaneCHROMIUM*>(
9262 cmd_data);
9263 if (!surface_->ScheduleSolidColorOverlayPlane(
9264 c.plane_z_order,
9265 gfx::Rect(c.bounds_x, c.bounds_y, c.bounds_width, c.bounds_height),
9266 c.red, c.green, c.blue, c.alpha)) {
9267 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
9268 "glScheduleSolidColorOverlayPlaneCHROMIUM",
9269 "failed to schedule overlay");
9270 }
9271 return error::kNoError;
9272 }
9273
9274
9257 error::Error GLES2DecoderImpl::GetAttribLocationHelper( 9275 error::Error GLES2DecoderImpl::GetAttribLocationHelper(
9258 GLuint client_id, uint32 location_shm_id, uint32 location_shm_offset, 9276 GLuint client_id, uint32 location_shm_id, uint32 location_shm_offset,
9259 const std::string& name_str) { 9277 const std::string& name_str) {
9260 if (!StringIsValidForGLES(name_str.c_str())) { 9278 if (!StringIsValidForGLES(name_str.c_str())) {
9261 LOCAL_SET_GL_ERROR( 9279 LOCAL_SET_GL_ERROR(
9262 GL_INVALID_VALUE, "glGetAttribLocation", "Invalid character"); 9280 GL_INVALID_VALUE, "glGetAttribLocation", "Invalid character");
9263 return error::kNoError; 9281 return error::kNoError;
9264 } 9282 }
9265 Program* program = GetProgramInfoNotShader( 9283 Program* program = GetProgramInfoNotShader(
9266 client_id, "glGetAttribLocation"); 9284 client_id, "glGetAttribLocation");
(...skipping 5798 matching lines...) Expand 10 before | Expand all | Expand 10 after
15065 return error::kNoError; 15083 return error::kNoError;
15066 } 15084 }
15067 15085
15068 // Include the auto-generated part of this file. We split this because it means 15086 // Include the auto-generated part of this file. We split this because it means
15069 // we can easily edit the non-auto generated parts right here in this file 15087 // we can easily edit the non-auto generated parts right here in this file
15070 // instead of having to edit some template or the code generator. 15088 // instead of having to edit some template or the code generator.
15071 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 15089 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
15072 15090
15073 } // namespace gles2 15091 } // namespace gles2
15074 } // namespace gpu 15092 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698