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/include/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 #include "core/fxge/include/fx_ge.h" | |
12 | 11 |
13 namespace { | 12 namespace { |
14 | 13 |
15 const uint8_t color_sqrt[256] = { | 14 const uint8_t color_sqrt[256] = { |
16 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, |
17 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, |
18 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, |
19 0x5E, 0x60, 0x61, 0x63, 0x64, 0x65, 0x67, 0x68, 0x69, 0x6B, 0x6C, 0x6D, | 18 0x5E, 0x60, 0x61, 0x63, 0x64, 0x65, 0x67, 0x68, 0x69, 0x6B, 0x6C, 0x6D, |
20 0x6E, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, | 19 0x6E, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, |
21 0x7B, 0x7C, 0x7D, 0x7E, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, | 20 0x7B, 0x7C, 0x7D, 0x7E, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, |
(...skipping 5009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5031 } | 5030 } |
5032 src_alpha_scan = m_pScanlineAlphaV; | 5031 src_alpha_scan = m_pScanlineAlphaV; |
5033 dest_alpha_scan = dest_alpha_buf; | 5032 dest_alpha_scan = dest_alpha_buf; |
5034 if (dest_alpha_scan) { | 5033 if (dest_alpha_scan) { |
5035 for (i = 0; i < m_DestHeight; i++) { | 5034 for (i = 0; i < m_DestHeight; i++) { |
5036 *dest_alpha_scan = *src_alpha_scan++; | 5035 *dest_alpha_scan = *src_alpha_scan++; |
5037 dest_alpha_scan += y_alpha_step; | 5036 dest_alpha_scan += y_alpha_step; |
5038 } | 5037 } |
5039 } | 5038 } |
5040 } | 5039 } |
OLD | NEW |