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

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

Issue 2520073003: handle antialiased rendering as premultiplied (Closed)
Patch Set: more work on premultiplied mismatch 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
« no previous file with comments | « core/fxge/cfx_renderdevice.h ('k') | core/fxge/fx_dib.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_bUnPreMultiply = false; 70 m_nFormat = Format::kCleared;
71 #endif 71 #endif
72 } 72 }
73 73
74 #define _MAX_OOM_LIMIT_ 12000000 74 #define _MAX_OOM_LIMIT_ 12000000
75 bool CFX_DIBitmap::Create(int width, 75 bool CFX_DIBitmap::Create(int width,
76 int height, 76 int height,
77 FXDIB_Format format, 77 FXDIB_Format format,
78 uint8_t* pBuffer, 78 uint8_t* pBuffer,
79 int pitch) { 79 int pitch) {
80 m_pBuffer = nullptr; 80 m_pBuffer = nullptr;
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 uint32_t* pSrcPalette) { 1688 uint32_t* pSrcPalette) {
1689 m_pBitmap = pdfium::MakeUnique<CFX_DIBitmap>(); 1689 m_pBitmap = pdfium::MakeUnique<CFX_DIBitmap>();
1690 if (!m_pBitmap->Create(width, height, src_format)) { 1690 if (!m_pBitmap->Create(width, height, src_format)) {
1691 m_pBitmap.reset(); 1691 m_pBitmap.reset();
1692 return false; 1692 return false;
1693 } 1693 }
1694 if (pSrcPalette) 1694 if (pSrcPalette)
1695 m_pBitmap->CopyPalette(pSrcPalette); 1695 m_pBitmap->CopyPalette(pSrcPalette);
1696 return true; 1696 return true;
1697 } 1697 }
OLDNEW
« no previous file with comments | « core/fxge/cfx_renderdevice.h ('k') | core/fxge/fx_dib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698