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

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

Issue 2807923002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics Created 3 years, 8 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (colorSpace) 113 if (colorSpace)
114 *colorSpace = kJPEG_SkYUVColorSpace; 114 *colorSpace = kJPEG_SkYUVColorSpace;
115 115
116 return m_frameGenerator->getYUVComponentSizes(m_data.get(), sizeInfo); 116 return m_frameGenerator->getYUVComponentSizes(m_data.get(), sizeInfo);
117 } 117 }
118 118
119 bool DecodingImageGenerator::onGetYUV8Planes(const SkYUVSizeInfo& sizeInfo, 119 bool DecodingImageGenerator::onGetYUV8Planes(const SkYUVSizeInfo& sizeInfo,
120 void* planes[3]) { 120 void* planes[3]) {
121 // YUV decoding does not currently support progressive decoding. See comment 121 // YUV decoding does not currently support progressive decoding. See comment
122 // in ImageFrameGenerator.h. 122 // in ImageFrameGenerator.h.
123 ASSERT(m_canYUVDecode && m_allDataReceived); 123 DCHECK(m_canYUVDecode && m_allDataReceived);
tkent 2017/04/09 23:17:27 Split this into two DCHECKs.
Hwanseung Lee 2017/04/11 22:24:10 Done.
124 124
125 TRACE_EVENT1("blink", "DecodingImageGenerator::getYUV8Planes", "frame index", 125 TRACE_EVENT1("blink", "DecodingImageGenerator::getYUV8Planes", "frame index",
126 static_cast<int>(m_frameIndex)); 126 static_cast<int>(m_frameIndex));
127 127
128 PlatformInstrumentation::willDecodeLazyPixelRef(uniqueID()); 128 PlatformInstrumentation::willDecodeLazyPixelRef(uniqueID());
129 bool decoded = 129 bool decoded =
130 m_frameGenerator->decodeToYUV(m_data.get(), m_frameIndex, sizeInfo.fSizes, 130 m_frameGenerator->decodeToYUV(m_data.get(), m_frameIndex, sizeInfo.fSizes,
131 planes, sizeInfo.fWidthBytes); 131 planes, sizeInfo.fWidthBytes);
132 PlatformInstrumentation::didDecodeLazyPixelRef(); 132 PlatformInstrumentation::didDecodeLazyPixelRef();
133 133
(...skipping 21 matching lines...) Expand all
155 ImageFrameGenerator::create(SkISize::Make(size.width(), size.height()), 155 ImageFrameGenerator::create(SkISize::Make(size.width(), size.height()),
156 false, decoder->colorBehavior()); 156 false, decoder->colorBehavior());
157 if (!frame) 157 if (!frame)
158 return nullptr; 158 return nullptr;
159 159
160 return new DecodingImageGenerator(frame, info, segmentReader.release(), true, 160 return new DecodingImageGenerator(frame, info, segmentReader.release(), true,
161 0); 161 0);
162 } 162 }
163 163
164 } // namespace blink 164 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698