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

Side by Side Diff: skia/ext/convolver.cc

Issue 12842: Move convolver, image_operations, and skia_utils from base/gfx to skia/ext.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | Annotate | Revision Log
« no previous file with comments | « skia/ext/convolver.h ('k') | skia/ext/convolver_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/base/gfx/convolver.cc:r69-2775
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "skia/ext/convolver.h"
8
7 #include "base/basictypes.h" 9 #include "base/basictypes.h"
8 #include "base/gfx/convolver.h"
9 #include "base/logging.h" 10 #include "base/logging.h"
10 11
11 namespace gfx { 12 namespace skia {
12 13
13 namespace { 14 namespace {
14 15
15 // Converts the argument to an 8-bit unsigned value by clamping to the range 16 // Converts the argument to an 8-bit unsigned value by clamping to the range
16 // 0-255. 17 // 0-255.
17 inline uint8 ClampTo8(int32 a) { 18 inline uint8 ClampTo8(int32 a) {
18 if (static_cast<uint32>(a) < 256) 19 if (static_cast<uint32>(a) < 256)
19 return a; // Avoid the extra check in the common case. 20 return a; // Avoid the extra check in the common case.
20 if (a < 0) 21 if (a < 0)
21 return 0; 22 return 0;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 first_row_for_filter, 325 first_row_for_filter,
325 filter_x.num_values(), cur_output_row); 326 filter_x.num_values(), cur_output_row);
326 } else { 327 } else {
327 ConvolveVertically<false>(filter_values, filter_length, 328 ConvolveVertically<false>(filter_values, filter_length,
328 first_row_for_filter, 329 first_row_for_filter,
329 filter_x.num_values(), cur_output_row); 330 filter_x.num_values(), cur_output_row);
330 } 331 }
331 } 332 }
332 } 333 }
333 334
334 } // namespace gfx 335 } // namespace skia
335 336
OLDNEW
« no previous file with comments | « skia/ext/convolver.h ('k') | skia/ext/convolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698