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

Side by Side Diff: content/common/gpu/client/gl_helper_scaling.cc

Issue 12310041: experiment with -Wimplicit-fallthrough Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 6 years, 11 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
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 "content/common/gpu/client/gl_helper_scaling.h" 5 #include "content/common/gpu/client/gl_helper_scaling.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 if (current_shader == SHADER_BILINEAR2 && x_ops->size() >= 2) { 360 if (current_shader == SHADER_BILINEAR2 && x_ops->size() >= 2) {
361 // 2y + 2x passes 361 // 2y + 2x passes
362 x_passes = 2; 362 x_passes = 2;
363 current_shader = SHADER_BILINEAR2X2; 363 current_shader = SHADER_BILINEAR2X2;
364 } else if (current_shader == SHADER_BILINEAR) { 364 } else if (current_shader == SHADER_BILINEAR) {
365 // 1y + Nx passes 365 // 1y + Nx passes
366 scale_x = true; 366 scale_x = true;
367 switch (x_ops->size()) { 367 switch (x_ops->size()) {
368 case 0: 368 case 0:
369 NOTREACHED(); 369 NOTREACHED();
370 FALLTHROUGH_INTENDED;
370 case 1: 371 case 1:
371 if (x_ops->front().scale_factor == 3) { 372 if (x_ops->front().scale_factor == 3) {
372 current_shader = SHADER_BILINEAR3; 373 current_shader = SHADER_BILINEAR3;
373 } 374 }
374 x_passes = 1; 375 x_passes = 1;
375 break; 376 break;
376 case 2: 377 case 2:
377 x_passes = 2; 378 x_passes = 2;
378 current_shader = SHADER_BILINEAR2; 379 current_shader = SHADER_BILINEAR2;
379 break; 380 break;
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 static_cast<float>(dst_size.width()), 959 static_cast<float>(dst_size.width()),
959 static_cast<float>(dst_size.height())); 960 static_cast<float>(dst_size.height()));
960 961
961 context_->uniform2f(scaling_vector_location_, 962 context_->uniform2f(scaling_vector_location_,
962 scale_x ? 1.0 : 0.0, 963 scale_x ? 1.0 : 0.0,
963 scale_x ? 0.0 : 1.0); 964 scale_x ? 0.0 : 1.0);
964 context_->uniform4fv(color_weights_location_, 1, color_weights); 965 context_->uniform4fv(color_weights_location_, 1, color_weights);
965 } 966 }
966 967
967 } // namespace content 968 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698