diff options
author | Lei Zhang <thestig@chromium.org> | 2017-08-17 01:31:18 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-17 10:13:18 +0000 |
commit | 19319b7d047e50c54ff845715553adf4652cd793 (patch) | |
tree | 0cd4f485359fa1daa306ac892e02425b52eb3e9a /core/fxge/android | |
parent | 2e56505ed801ee6da3ecb7a1dfe0473941028c6e (diff) | |
download | pdfium-19319b7d047e50c54ff845715553adf4652cd793.tar.xz |
Roll build_revision to bff6ee8.
Also roll buildtools_revision to f90f6a5 and update Android code that
did not previously pass the Chromium style plugin.
TBR=dsinclair@chromium.org
Change-Id: Ifb1193cee8f68ac99a31c8d43195e4d7005eeafb
Reviewed-on: https://pdfium-review.googlesource.com/11293
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/android')
-rw-r--r-- | core/fxge/android/cfpf_skiabufferfont.cpp | 16 | ||||
-rw-r--r-- | core/fxge/android/cfpf_skiabufferfont.h | 5 | ||||
-rw-r--r-- | core/fxge/android/cfpf_skiafilefont.cpp | 17 | ||||
-rw-r--r-- | core/fxge/android/cfpf_skiafilefont.h | 5 | ||||
-rw-r--r-- | core/fxge/android/cfpf_skiafontdescriptor.cpp | 32 | ||||
-rw-r--r-- | core/fxge/android/cfpf_skiafontdescriptor.h | 24 | ||||
-rw-r--r-- | core/fxge/android/cfpf_skiapathfont.cpp | 27 | ||||
-rw-r--r-- | core/fxge/android/cfpf_skiapathfont.h | 17 |
8 files changed, 111 insertions, 32 deletions
diff --git a/core/fxge/android/cfpf_skiabufferfont.cpp b/core/fxge/android/cfpf_skiabufferfont.cpp new file mode 100644 index 0000000000..3fce483bdc --- /dev/null +++ b/core/fxge/android/cfpf_skiabufferfont.cpp @@ -0,0 +1,16 @@ +// Copyright 2017 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#include "core/fxge/android/cfpf_skiabufferfont.h" + +CFPF_SkiaBufferFont::CFPF_SkiaBufferFont() + : m_pBuffer(nullptr), m_szBuffer(0) {} + +CFPF_SkiaBufferFont::~CFPF_SkiaBufferFont() = default; + +int32_t CFPF_SkiaBufferFont::GetType() const { + return FPF_SKIAFONTTYPE_Buffer; +} diff --git a/core/fxge/android/cfpf_skiabufferfont.h b/core/fxge/android/cfpf_skiabufferfont.h index 02fdadea1e..3a94a51b6a 100644 --- a/core/fxge/android/cfpf_skiabufferfont.h +++ b/core/fxge/android/cfpf_skiabufferfont.h @@ -13,10 +13,11 @@ class CFPF_SkiaBufferFont : public CFPF_SkiaFontDescriptor { public: - CFPF_SkiaBufferFont() : m_pBuffer(nullptr), m_szBuffer(0) {} + CFPF_SkiaBufferFont(); + ~CFPF_SkiaBufferFont() override; // CFPF_SkiaFontDescriptor - int32_t GetType() const override { return FPF_SKIAFONTTYPE_Buffer; } + int32_t GetType() const override; void* m_pBuffer; size_t m_szBuffer; diff --git a/core/fxge/android/cfpf_skiafilefont.cpp b/core/fxge/android/cfpf_skiafilefont.cpp new file mode 100644 index 0000000000..2cdf58a4ce --- /dev/null +++ b/core/fxge/android/cfpf_skiafilefont.cpp @@ -0,0 +1,17 @@ +// Copyright 2017 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#include "core/fxge/android/cfpf_skiafilefont.h" + +#include "core/fxcrt/fx_stream.h" + +CFPF_SkiaFileFont::CFPF_SkiaFileFont() = default; + +CFPF_SkiaFileFont::~CFPF_SkiaFileFont() = default; + +int32_t CFPF_SkiaFileFont::GetType() const { + return FPF_SKIAFONTTYPE_File; +} diff --git a/core/fxge/android/cfpf_skiafilefont.h b/core/fxge/android/cfpf_skiafilefont.h index 2c9fc90ad2..4496fde078 100644 --- a/core/fxge/android/cfpf_skiafilefont.h +++ b/core/fxge/android/cfpf_skiafilefont.h @@ -16,10 +16,11 @@ class IFX_SeekableReadStream; class CFPF_SkiaFileFont : public CFPF_SkiaFontDescriptor { public: - CFPF_SkiaFileFont() {} + CFPF_SkiaFileFont(); + ~CFPF_SkiaFileFont() override; // CFPF_SkiaFontDescriptor - int32_t GetType() const override { return FPF_SKIAFONTTYPE_File; } + int32_t GetType() const override; CFX_RetainPtr<IFX_SeekableReadStream> m_pFile; }; diff --git a/core/fxge/android/cfpf_skiafontdescriptor.cpp b/core/fxge/android/cfpf_skiafontdescriptor.cpp new file mode 100644 index 0000000000..0c5210795c --- /dev/null +++ b/core/fxge/android/cfpf_skiafontdescriptor.cpp @@ -0,0 +1,32 @@ +// Copyright 2017 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#include "core/fxge/android/cfpf_skiafontdescriptor.h" + +#include "core/fxcrt/fx_memory.h" + +CFPF_SkiaFontDescriptor::CFPF_SkiaFontDescriptor() + : m_pFamily(nullptr), + m_dwStyle(0), + m_iFaceIndex(0), + m_dwCharsets(0), + m_iGlyphNum(0) {} + +CFPF_SkiaFontDescriptor::~CFPF_SkiaFontDescriptor() { + FX_Free(m_pFamily); +} + +int32_t CFPF_SkiaFontDescriptor::GetType() const { + return FPF_SKIAFONTTYPE_Unknown; +} + +void CFPF_SkiaFontDescriptor::SetFamily(const char* pFamily) { + FX_Free(m_pFamily); + int32_t iSize = FXSYS_strlen(pFamily); + m_pFamily = FX_Alloc(char, iSize + 1); + memcpy(m_pFamily, pFamily, iSize * sizeof(char)); + m_pFamily[iSize] = 0; +} diff --git a/core/fxge/android/cfpf_skiafontdescriptor.h b/core/fxge/android/cfpf_skiafontdescriptor.h index f653050feb..00a19ecc54 100644 --- a/core/fxge/android/cfpf_skiafontdescriptor.h +++ b/core/fxge/android/cfpf_skiafontdescriptor.h @@ -13,23 +13,13 @@ class CFPF_SkiaFontDescriptor { public: - CFPF_SkiaFontDescriptor() - : m_pFamily(nullptr), - m_dwStyle(0), - m_iFaceIndex(0), - m_dwCharsets(0), - m_iGlyphNum(0) {} - virtual ~CFPF_SkiaFontDescriptor() { FX_Free(m_pFamily); } - - virtual int32_t GetType() const { return FPF_SKIAFONTTYPE_Unknown; } - - void SetFamily(const char* pFamily) { - FX_Free(m_pFamily); - int32_t iSize = FXSYS_strlen(pFamily); - m_pFamily = FX_Alloc(char, iSize + 1); - memcpy(m_pFamily, pFamily, iSize * sizeof(char)); - m_pFamily[iSize] = 0; - } + CFPF_SkiaFontDescriptor(); + virtual ~CFPF_SkiaFontDescriptor(); + + virtual int32_t GetType() const; + + void SetFamily(const char* pFamily); + char* m_pFamily; uint32_t m_dwStyle; int32_t m_iFaceIndex; diff --git a/core/fxge/android/cfpf_skiapathfont.cpp b/core/fxge/android/cfpf_skiapathfont.cpp new file mode 100644 index 0000000000..44e19bc8e5 --- /dev/null +++ b/core/fxge/android/cfpf_skiapathfont.cpp @@ -0,0 +1,27 @@ +// Copyright 2017 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#include "core/fxge/android/cfpf_skiapathfont.h" + +#include "core/fxcrt/fx_memory.h" + +CFPF_SkiaPathFont::CFPF_SkiaPathFont() : m_pPath(nullptr) {} + +CFPF_SkiaPathFont::~CFPF_SkiaPathFont() { + FX_Free(m_pPath); +} + +int32_t CFPF_SkiaPathFont::GetType() const { + return FPF_SKIAFONTTYPE_Path; +} + +void CFPF_SkiaPathFont::SetPath(const char* pPath) { + FX_Free(m_pPath); + int32_t iSize = FXSYS_strlen(pPath); + m_pPath = FX_Alloc(char, iSize + 1); + memcpy(m_pPath, pPath, iSize * sizeof(char)); + m_pPath[iSize] = 0; +} diff --git a/core/fxge/android/cfpf_skiapathfont.h b/core/fxge/android/cfpf_skiapathfont.h index 8b7a4f9fb4..6cba42acff 100644 --- a/core/fxge/android/cfpf_skiapathfont.h +++ b/core/fxge/android/cfpf_skiapathfont.h @@ -14,19 +14,14 @@ class CFPF_SkiaPathFont : public CFPF_SkiaFontDescriptor { public: - CFPF_SkiaPathFont() : m_pPath(nullptr) {} - ~CFPF_SkiaPathFont() override { FX_Free(m_pPath); } + CFPF_SkiaPathFont(); + ~CFPF_SkiaPathFont() override; // CFPF_SkiaFontDescriptor - int32_t GetType() const override { return FPF_SKIAFONTTYPE_Path; } - - void SetPath(const char* pPath) { - FX_Free(m_pPath); - int32_t iSize = FXSYS_strlen(pPath); - m_pPath = FX_Alloc(char, iSize + 1); - memcpy(m_pPath, pPath, iSize * sizeof(char)); - m_pPath[iSize] = 0; - } + int32_t GetType() const override; + + void SetPath(const char* pPath); + char* m_pPath; }; |