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

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp

Issue 818363006: fix a few linux compilation warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Restore origina cmslut.c Created 5 years, 11 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 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #include "../../../include/fxcodec/fx_codec.h" 8 #include "../../../include/fxcodec/fx_codec.h"
9 #include "../../../include/fpdfapi/fpdf_module.h" 9 #include "../../../include/fpdfapi/fpdf_module.h"
10 #include "../../../include/fpdfapi/fpdf_render.h" 10 #include "../../../include/fpdfapi/fpdf_render.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 src_pitch /= 8; 324 src_pitch /= 8;
325 src_pitch *= m_Height; 325 src_pitch *= m_Height;
326 if (!src_pitch.IsValid()) { 326 if (!src_pitch.IsValid()) {
327 return 0; 327 return 0;
328 } 328 }
329 m_pStreamAcc = FX_NEW CPDF_StreamAcc; 329 m_pStreamAcc = FX_NEW CPDF_StreamAcc;
330 m_pStreamAcc->LoadAllData(pStream, FALSE, src_pitch.ValueOrDie(), TRUE); 330 m_pStreamAcc->LoadAllData(pStream, FALSE, src_pitch.ValueOrDie(), TRUE);
331 if (m_pStreamAcc->GetSize() == 0 || m_pStreamAcc->GetData() == NULL) { 331 if (m_pStreamAcc->GetSize() == 0 || m_pStreamAcc->GetData() == NULL) {
332 return 0; 332 return 0;
333 } 333 }
334 const CFX_ByteString& decoder = m_pStreamAcc->GetImageDecoder();
335 int ret = CreateDecoder(); 334 int ret = CreateDecoder();
336 if (ret != 1) { 335 if (ret != 1) {
337 if (!ret) { 336 if (!ret) {
338 return ret; 337 return ret;
339 } 338 }
340 if (!ContinueToLoadMask()) { 339 if (!ContinueToLoadMask()) {
341 return 0; 340 return 0;
342 } 341 }
343 if (m_bHasMask) { 342 if (m_bHasMask) {
344 StratLoadMask(); 343 StratLoadMask();
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 if (!m_bCached) { 1566 if (!m_bCached) {
1568 if (m_pBitmap) { 1567 if (m_pBitmap) {
1569 delete m_pBitmap; 1568 delete m_pBitmap;
1570 m_pBitmap = NULL; 1569 m_pBitmap = NULL;
1571 } 1570 }
1572 if (m_pMask) { 1571 if (m_pMask) {
1573 delete m_pMask; 1572 delete m_pMask;
1574 } 1573 }
1575 } 1574 }
1576 } 1575 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698