OLD | NEW |
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/fxcodec/include/fx_codec.h" | 7 #include "core/fxcodec/fx_codec.h" |
8 #include "core/fxge/dib/dib_int.h" | 8 #include "core/fxge/dib/dib_int.h" |
9 #include "core/fxge/ge/cfx_cliprgn.h" | 9 #include "core/fxge/ge/cfx_cliprgn.h" |
10 #include "core/fxge/include/cfx_gemodule.h" | 10 #include "core/fxge/include/cfx_gemodule.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 const uint8_t color_sqrt[256] = { | 14 const uint8_t color_sqrt[256] = { |
15 0x00, 0x03, 0x07, 0x0B, 0x0F, 0x12, 0x16, 0x19, 0x1D, 0x20, 0x23, 0x26, | 15 0x00, 0x03, 0x07, 0x0B, 0x0F, 0x12, 0x16, 0x19, 0x1D, 0x20, 0x23, 0x26, |
16 0x29, 0x2C, 0x2F, 0x32, 0x35, 0x37, 0x3A, 0x3C, 0x3F, 0x41, 0x43, 0x46, | 16 0x29, 0x2C, 0x2F, 0x32, 0x35, 0x37, 0x3A, 0x3C, 0x3F, 0x41, 0x43, 0x46, |
17 0x48, 0x4A, 0x4C, 0x4E, 0x50, 0x52, 0x54, 0x56, 0x57, 0x59, 0x5B, 0x5C, | 17 0x48, 0x4A, 0x4C, 0x4E, 0x50, 0x52, 0x54, 0x56, 0x57, 0x59, 0x5B, 0x5C, |
(...skipping 5012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5030 } | 5030 } |
5031 src_alpha_scan = m_pScanlineAlphaV; | 5031 src_alpha_scan = m_pScanlineAlphaV; |
5032 dest_alpha_scan = dest_alpha_buf; | 5032 dest_alpha_scan = dest_alpha_buf; |
5033 if (dest_alpha_scan) { | 5033 if (dest_alpha_scan) { |
5034 for (i = 0; i < m_DestHeight; i++) { | 5034 for (i = 0; i < m_DestHeight; i++) { |
5035 *dest_alpha_scan = *src_alpha_scan++; | 5035 *dest_alpha_scan = *src_alpha_scan++; |
5036 dest_alpha_scan += y_alpha_step; | 5036 dest_alpha_scan += y_alpha_step; |
5037 } | 5037 } |
5038 } | 5038 } |
5039 } | 5039 } |
OLD | NEW |