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

Side by Side Diff: cc/output/gl_renderer.cc

Issue 1158433010: Reland: cc: Fix size_t to int truncations in layers/ output/ playback/ quads/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 "cc/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 2214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 gl_->Uniform4fv(draw_cache_.background_color_location, 1, 2225 gl_->Uniform4fv(draw_cache_.background_color_location, 1,
2226 background_color.data); 2226 background_color.data);
2227 } 2227 }
2228 2228
2229 gl_->Uniform1fv( 2229 gl_->Uniform1fv(
2230 static_cast<int>(draw_cache_.vertex_opacity_location), 2230 static_cast<int>(draw_cache_.vertex_opacity_location),
2231 static_cast<int>(draw_cache_.vertex_opacity_data.size()), 2231 static_cast<int>(draw_cache_.vertex_opacity_data.size()),
2232 static_cast<float*>(&draw_cache_.vertex_opacity_data.front())); 2232 static_cast<float*>(&draw_cache_.vertex_opacity_data.front()));
2233 2233
2234 // Draw the quads! 2234 // Draw the quads!
2235 gl_->DrawElements(GL_TRIANGLES, 6 * draw_cache_.matrix_data.size(), 2235 gl_->DrawElements(GL_TRIANGLES,
2236 6 * static_cast<int>(draw_cache_.matrix_data.size()),
2236 GL_UNSIGNED_SHORT, 0); 2237 GL_UNSIGNED_SHORT, 0);
2237 2238
2238 // Clear the cache. 2239 // Clear the cache.
2239 draw_cache_.program_id = -1; 2240 draw_cache_.program_id = -1;
2240 draw_cache_.uv_xform_data.resize(0); 2241 draw_cache_.uv_xform_data.resize(0);
2241 draw_cache_.vertex_opacity_data.resize(0); 2242 draw_cache_.vertex_opacity_data.resize(0);
2242 draw_cache_.matrix_data.resize(0); 2243 draw_cache_.matrix_data.resize(0);
2243 2244
2244 // If we had a clipped binding, prepare the shared binding for the 2245 // If we had a clipped binding, prepare the shared binding for the
2245 // next inserts. 2246 // next inserts.
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
3506 context_support_->ScheduleOverlayPlane( 3507 context_support_->ScheduleOverlayPlane(
3507 overlay.plane_z_order, 3508 overlay.plane_z_order,
3508 overlay.transform, 3509 overlay.transform,
3509 pending_overlay_resources_.back()->texture_id(), 3510 pending_overlay_resources_.back()->texture_id(),
3510 ToNearestRect(overlay.display_rect), 3511 ToNearestRect(overlay.display_rect),
3511 overlay.uv_rect); 3512 overlay.uv_rect);
3512 } 3513 }
3513 } 3514 }
3514 3515
3515 } // namespace cc 3516 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698