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

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

Issue 1539203002: Switch to standard integer types in cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes 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 unified diff | Download patch
« no previous file with comments | « cc/output/shader.h ('k') | cc/output/software_output_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/shader.h" 5 #include "cc/output/shader.h"
6 6
7 #include <stddef.h>
8
7 #include <algorithm> 9 #include <algorithm>
8 10
9 #include "base/basictypes.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
12 #include "cc/output/static_geometry_binding.h" 13 #include "cc/output/static_geometry_binding.h"
13 #include "gpu/command_buffer/client/gles2_interface.h" 14 #include "gpu/command_buffer/client/gles2_interface.h"
14 #include "ui/gfx/geometry/point.h" 15 #include "ui/gfx/geometry/point.h"
15 #include "ui/gfx/geometry/size.h" 16 #include "ui/gfx/geometry/size.h"
16 17
17 template <size_t size> 18 template <size_t size>
18 std::string StripLambda(const char(&shader)[size]) { 19 std::string StripLambda(const char(&shader)[size]) {
19 // Must contain at least "[]() {}" and trailing null (included in size). 20 // Must contain at least "[]() {}" and trailing null (included in size).
(...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 void main() { 2246 void main() {
2246 vec4 d4 = min(edge_dist[0], edge_dist[1]); 2247 vec4 d4 = min(edge_dist[0], edge_dist[1]);
2247 vec2 d2 = min(d4.xz, d4.yw); 2248 vec2 d2 = min(d4.xz, d4.yw);
2248 float aa = clamp(gl_FragCoord.w * min(d2.x, d2.y), 0.0, 1.0); 2249 float aa = clamp(gl_FragCoord.w * min(d2.x, d2.y), 0.0, 1.0);
2249 gl_FragColor = color * aa; 2250 gl_FragColor = color * aa;
2250 } 2251 }
2251 }); 2252 });
2252 } 2253 }
2253 2254
2254 } // namespace cc 2255 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/shader.h ('k') | cc/output/software_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698