| Index: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
|
| diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
|
| index b12a65a84438098c63bac2e12efaee5760bc6f3f..9973529da70fb7a37b1066b72c5aef02d764f2eb 100644
|
| --- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
|
| +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
|
| @@ -1092,12 +1092,20 @@ void CPDF_StreamContentParser::Handle_SetColorPS_Stroke() {
|
| }
|
| FX_Free(values);
|
| }
|
| -CFX_FloatRect _GetShadingBBox(CPDF_Stream* pStream,
|
| - int type,
|
| - const CFX_AffineMatrix* pMatrix,
|
| - CPDF_Function** pFuncs,
|
| - int nFuncs,
|
| - CPDF_ColorSpace* pCS);
|
| +CFX_FloatRect GetShadingBBox(CPDF_Stream* pStream,
|
| + ShadingType type,
|
| + const CFX_AffineMatrix* pMatrix,
|
| + CPDF_Function** pFuncs,
|
| + int nFuncs,
|
| + CPDF_ColorSpace* pCS);
|
| +
|
| +static bool IsMeshShading(ShadingType type) {
|
| + return type == kFreeFormGouraudTriangleMeshShading ||
|
| + type == kLatticeFormGouraudTriangleMeshShading ||
|
| + type == kCoonsPatchMeshShading ||
|
| + type == kTensorProductPatchMeshShading;
|
| +}
|
| +
|
| void CPDF_StreamContentParser::Handle_ShadeFill() {
|
| if (m_Options.m_bTextOnly) {
|
| return;
|
| @@ -1127,11 +1135,11 @@ void CPDF_StreamContentParser::Handle_ShadeFill() {
|
| } else {
|
| bbox = m_BBox;
|
| }
|
| - if (pShading->m_ShadingType >= 4) {
|
| - bbox.Intersect(_GetShadingBBox(ToStream(pShading->m_pShadingObj),
|
| - pShading->m_ShadingType, &pObj->m_Matrix,
|
| - pShading->m_pFunctions, pShading->m_nFuncs,
|
| - pShading->m_pCS));
|
| + if (IsMeshShading(pShading->m_ShadingType)) {
|
| + bbox.Intersect(GetShadingBBox(ToStream(pShading->m_pShadingObj),
|
| + pShading->m_ShadingType, &pObj->m_Matrix,
|
| + pShading->m_pFunctions, pShading->m_nFuncs,
|
| + pShading->m_pCS));
|
| }
|
| pObj->m_Left = bbox.left;
|
| pObj->m_Right = bbox.right;
|
|
|