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

Unified Diff: core/fpdfapi/fpdf_page/cpdf_image.cpp

Issue 2347993002: Clean up CPDF_Stream. (Closed)
Patch Set: ctor 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 side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/fpdf_page/cpdf_image.cpp
diff --git a/core/fpdfapi/fpdf_page/cpdf_image.cpp b/core/fpdfapi/fpdf_page/cpdf_image.cpp
index 02e492b27d18898547a0ec5736e145af1ea10916..32b69bf9cb48adabf137b7276006b209c370c32a 100644
--- a/core/fpdfapi/fpdf_page/cpdf_image.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_image.cpp
@@ -116,7 +116,7 @@ CPDF_Dictionary* CPDF_Image::InitJPEG(uint8_t* pData, uint32_t size) {
m_Width = width;
m_Height = height;
if (!m_pStream)
- m_pStream = new CPDF_Stream(nullptr, 0, nullptr);
+ m_pStream = new CPDF_Stream;
return pDict;
}
@@ -329,9 +329,9 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress) {
dest_offset = 0;
}
}
- if (!m_pStream) {
- m_pStream = new CPDF_Stream(nullptr, 0, nullptr);
- }
+ if (!m_pStream)
+ m_pStream = new CPDF_Stream;
+
m_pStream->InitStream(dest_buf, dest_size, pDict);
m_bIsMask = pBitmap->IsAlphaMask();
m_Width = BitmapWidth;

Powered by Google App Engine
This is Rietveld 408576698