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

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

Issue 2229953003: Support for custom primaries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test updated Created 4 years, 3 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/color_transform.cc ('k') | ui/gfx/color_transform_unittest.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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "ui/gfx/color_space.h" 9 #include "ui/gfx/color_space.h"
10 #include "ui/gfx/color_transform.h" 10 #include "ui/gfx/color_transform.h"
11 #include "ui/gfx/icc_profile.h" 11 #include "ui/gfx/icc_profile.h"
12 12
13 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 13 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
14 base::AtExitManager at_exit; 14 base::AtExitManager at_exit;
15 gfx::ICCProfile icc = 15 gfx::ICCProfile icc =
16 gfx::ICCProfile::FromData(reinterpret_cast<const char*>(data), size); 16 gfx::ICCProfile::FromData(reinterpret_cast<const char*>(data), size);
17 gfx::ColorSpace bt709 = gfx::ColorSpace::CreateREC709(); 17 gfx::ColorSpace bt709 = gfx::ColorSpace::CreateREC709();
18 std::unique_ptr<gfx::ColorTransform> t(gfx::ColorTransform::NewColorTransform( 18 std::unique_ptr<gfx::ColorTransform> t(gfx::ColorTransform::NewColorTransform(
19 bt709, icc.GetColorSpace(), gfx::ColorTransform::Intent::ABSOLUTE)); 19 bt709, icc.GetColorSpace(),
20 gfx::ColorTransform::Intent::INTENT_ABSOLUTE));
20 gfx::ColorTransform::TriStim tmp(16.0f / 255.0f, 0.5f, 0.5f); 21 gfx::ColorTransform::TriStim tmp(16.0f / 255.0f, 0.5f, 0.5f);
21 t->transform(&tmp, 1); 22 t->transform(&tmp, 1);
22 return 0; 23 return 0;
23 } 24 }
OLDNEW
« no previous file with comments | « ui/gfx/color_transform.cc ('k') | ui/gfx/color_transform_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698