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

Side by Side Diff: ui/gfx/color_analysis.cc

Issue 1544283002: Clean up header files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/platform_font_win.cc » ('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 (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 "ui/gfx/color_analysis.h" 5 #include "ui/gfx/color_analysis.h"
6 6
7 #include <limits.h>
7 #include <stdint.h> 8 #include <stdint.h>
8 9
9 #include <algorithm> 10 #include <algorithm>
10 #include <limits> 11 #include <limits>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/logging.h" 14 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
15 #include "third_party/skia/include/core/SkBitmap.h" 16 #include "third_party/skia/include/core/SkBitmap.h"
16 #include "third_party/skia/include/core/SkUnPreMultiply.h" 17 #include "third_party/skia/include/core/SkUnPreMultiply.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 gfx::Matrix3F covariance = ComputeColorCovariance(source_bitmap); 576 gfx::Matrix3F covariance = ComputeColorCovariance(source_bitmap);
576 gfx::Matrix3F eigenvectors = gfx::Matrix3F::Zeros(); 577 gfx::Matrix3F eigenvectors = gfx::Matrix3F::Zeros();
577 gfx::Vector3dF eigenvals = covariance.SolveEigenproblem(&eigenvectors); 578 gfx::Vector3dF eigenvals = covariance.SolveEigenproblem(&eigenvectors);
578 gfx::Vector3dF principal = eigenvectors.get_column(0); 579 gfx::Vector3dF principal = eigenvectors.get_column(0);
579 if (eigenvals == gfx::Vector3dF() || principal == gfx::Vector3dF()) 580 if (eigenvals == gfx::Vector3dF() || principal == gfx::Vector3dF())
580 return false; // This may happen for some edge cases. 581 return false; // This may happen for some edge cases.
581 return ApplyColorReduction(source_bitmap, principal, true, target_bitmap); 582 return ApplyColorReduction(source_bitmap, principal, true, target_bitmap);
582 } 583 }
583 584
584 } // color_utils 585 } // color_utils
OLDNEW
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/platform_font_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698