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

Side by Side Diff: core/fxge/dib/fx_dib_main.cpp

Issue 2520073003: handle antialiased rendering as premultiplied (Closed)
Patch Set: missed an ifdef Created 4 years, 1 month 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 "core/fxge/fx_dib.h" 7 #include "core/fxge/fx_dib.h"
8 8
9 #include <limits.h> 9 #include <limits.h>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 bool CFX_DIBSource::SkipToScanline(int line, IFX_Pause* pPause) const { 61 bool CFX_DIBSource::SkipToScanline(int line, IFX_Pause* pPause) const {
62 return false; 62 return false;
63 } 63 }
64 64
65 CFX_DIBitmap::CFX_DIBitmap() { 65 CFX_DIBitmap::CFX_DIBitmap() {
66 m_bExtBuf = false; 66 m_bExtBuf = false;
67 m_pBuffer = nullptr; 67 m_pBuffer = nullptr;
68 m_pPalette = nullptr; 68 m_pPalette = nullptr;
69 #ifdef _SKIA_SUPPORT_PATHS_ 69 #ifdef _SKIA_SUPPORT_PATHS_
70 m_bIsOffscreen = false;
70 m_bUnPreMultiply = false; 71 m_bUnPreMultiply = false;
71 #endif 72 #endif
72 } 73 }
73 74
74 #define _MAX_OOM_LIMIT_ 12000000 75 #define _MAX_OOM_LIMIT_ 12000000
75 bool CFX_DIBitmap::Create(int width, 76 bool CFX_DIBitmap::Create(int width,
76 int height, 77 int height,
77 FXDIB_Format format, 78 FXDIB_Format format,
78 uint8_t* pBuffer, 79 uint8_t* pBuffer,
79 int pitch) { 80 int pitch) {
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 uint32_t* pSrcPalette) { 1689 uint32_t* pSrcPalette) {
1689 m_pBitmap = pdfium::MakeUnique<CFX_DIBitmap>(); 1690 m_pBitmap = pdfium::MakeUnique<CFX_DIBitmap>();
1690 if (!m_pBitmap->Create(width, height, src_format)) { 1691 if (!m_pBitmap->Create(width, height, src_format)) {
1691 m_pBitmap.reset(); 1692 m_pBitmap.reset();
1692 return false; 1693 return false;
1693 } 1694 }
1694 if (pSrcPalette) 1695 if (pSrcPalette)
1695 m_pBitmap->CopyPalette(pSrcPalette); 1696 m_pBitmap->CopyPalette(pSrcPalette);
1696 return true; 1697 return true;
1697 } 1698 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698