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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp

Issue 1913283002: Trim Skia dependencies in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 11 matching lines...) Expand all
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "platform/graphics/ImageFrameGenerator.h" 26 #include "platform/graphics/ImageFrameGenerator.h"
27 27
28 #include "SkData.h" 28 #include "SkData.h"
29 #include "platform/TraceEvent.h" 29 #include "platform/TraceEvent.h"
30 #include "platform/graphics/ImageDecodingStore.h" 30 #include "platform/graphics/ImageDecodingStore.h"
31 #include "platform/image-decoders/ImageDecoder.h" 31 #include "platform/image-decoders/ImageDecoder.h"
32 #include "third_party/skia/include/core/SkYUVSizeInfo.h"
32 33
33 namespace blink { 34 namespace blink {
34 35
35 static bool compatibleInfo(const SkImageInfo& src, const SkImageInfo& dst) 36 static bool compatibleInfo(const SkImageInfo& src, const SkImageInfo& dst)
36 { 37 {
37 if (src == dst) 38 if (src == dst)
38 return true; 39 return true;
39 40
40 // It is legal to write kOpaque_SkAlphaType pixels into a kPremul_SkAlphaTyp e buffer. 41 // It is legal to write kOpaque_SkAlphaType pixels into a kPremul_SkAlphaTyp e buffer.
41 // This can happen when DeferredImageDecoder allocates an kOpaque_SkAlphaTyp e image 42 // This can happen when DeferredImageDecoder allocates an kOpaque_SkAlphaTyp e image
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 331
331 // Setting a dummy ImagePlanes object signals to the decoder that we want to do YUV decoding. 332 // Setting a dummy ImagePlanes object signals to the decoder that we want to do YUV decoding.
332 decoder->setData(data, true); 333 decoder->setData(data, true);
333 OwnPtr<ImagePlanes> dummyImagePlanes = adoptPtr(new ImagePlanes); 334 OwnPtr<ImagePlanes> dummyImagePlanes = adoptPtr(new ImagePlanes);
334 decoder->setImagePlanes(dummyImagePlanes.release()); 335 decoder->setImagePlanes(dummyImagePlanes.release());
335 336
336 return updateYUVComponentSizes(decoder.get(), sizeInfo->fSizes, sizeInfo->fW idthBytes); 337 return updateYUVComponentSizes(decoder.get(), sizeInfo->fSizes, sizeInfo->fW idthBytes);
337 } 338 }
338 339
339 } // namespace blink 340 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698