OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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//codec/chromeos/jpeg_codec_robust_slow.h" | 5 #include "ui/gfx/codec/chromeos/jpeg_codec_robust_slow.h" |
6 | 6 |
7 #include <setjmp.h> | 7 #include <setjmp.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 | 12 |
13 extern "C" { | 13 extern "C" { |
14 // IJG provides robust JPEG decode | 14 // IJG provides robust JPEG decode |
15 #include "third_party/libjpeg/jpeglib.h" | 15 #include "third_party/libjpeg/jpeglib.h" |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 int data_length = w * h * 4; | 332 int data_length = w * h * 4; |
333 | 333 |
334 SkBitmap* bitmap = new SkBitmap(); | 334 SkBitmap* bitmap = new SkBitmap(); |
335 bitmap->allocN32Pixels(w, h); | 335 bitmap->allocN32Pixels(w, h); |
336 memcpy(bitmap->getAddr32(0, 0), &data_vector[0], data_length); | 336 memcpy(bitmap->getAddr32(0, 0), &data_vector[0], data_length); |
337 | 337 |
338 return bitmap; | 338 return bitmap; |
339 } | 339 } |
340 | 340 |
341 } // namespace gfx | 341 } // namespace gfx |
OLD | NEW |