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

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

Issue 13065006: cc: Add DISALLOW_COPY_AND_ASSIGN where appropriate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add operator= for DrawingState back as well Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/shader.h ('k') | cc/resources/picture_layer_tiling.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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
10 10
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 arraysize(shader_uniforms), 438 arraysize(shader_uniforms),
439 arraysize(locations), 439 arraysize(locations),
440 locations, 440 locations,
441 using_bind_uniform, 441 using_bind_uniform,
442 base_uniform_index); 442 base_uniform_index);
443 443
444 sampler_location_ = locations[0]; 444 sampler_location_ = locations[0];
445 DCHECK(sampler_location_ != -1); 445 DCHECK(sampler_location_ != -1);
446 } 446 }
447 447
448 FragmentShaderOESImageExternal::FragmentShaderOESImageExternal()
449 : sampler_location_(-1) {}
450
448 bool FragmentShaderOESImageExternal::Init(WebGraphicsContext3D* context, 451 bool FragmentShaderOESImageExternal::Init(WebGraphicsContext3D* context,
449 unsigned program, 452 unsigned program,
450 bool using_bind_uniform, 453 bool using_bind_uniform,
451 int* base_uniform_index) { 454 int* base_uniform_index) {
452 static const char* shader_uniforms[] = { 455 static const char* shader_uniforms[] = {
453 "s_texture", 456 "s_texture",
454 }; 457 };
455 int locations[1]; 458 int locations[1];
456 459
457 GetProgramUniformLocations(context, 460 GetProgramUniformLocations(context,
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 vec2 texCoord = clamp(v_texCoord, 0.0, 1.0) * texTransform.zw + 1050 vec2 texCoord = clamp(v_texCoord, 0.0, 1.0) * texTransform.zw +
1048 texTransform.xy; 1051 texTransform.xy;
1049 vec2 coord = mod(floor(texCoord * frequency * 2.0), 2.0); 1052 vec2 coord = mod(floor(texCoord * frequency * 2.0), 2.0);
1050 float picker = abs(coord.x - coord.y); 1053 float picker = abs(coord.x - coord.y);
1051 gl_FragColor = mix(color1, color2, picker) * alpha; 1054 gl_FragColor = mix(color1, color2, picker) * alpha;
1052 } 1055 }
1053 ); 1056 );
1054 } 1057 }
1055 1058
1056 } // namespace cc 1059 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/shader.h ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698