summaryrefslogtreecommitdiff
path: root/xfa/src/fdp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-22 11:22:59 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-22 11:22:59 -0800
commit2373da22a2e754ae9b0e7d913da0ce2e925f76a0 (patch)
treec60df7975521ed686d5c0ffc5dac266024537619 /xfa/src/fdp
parent95bbe1341939957ec20b2b309e6dfa6f522dd06e (diff)
downloadpdfium-2373da22a2e754ae9b0e7d913da0ce2e925f76a0.tar.xz
Remove CFX_ThreadLock (its a no-op)
We wouldn't want to imply that any of this is thread-safe ... R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1724483002 .
Diffstat (limited to 'xfa/src/fdp')
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.h1
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.cpp2
-rw-r--r--xfa/src/fdp/src/fde/fde_render.cpp14
-rw-r--r--xfa/src/fdp/src/fde/fde_render.h2
-rw-r--r--xfa/src/fdp/src/xml/fde_xml_imp.cpp2
5 files changed, 3 insertions, 18 deletions
diff --git a/xfa/src/fdp/src/css/fde_csscache.h b/xfa/src/fdp/src/css/fde_csscache.h
index 637fd11866..d42821b969 100644
--- a/xfa/src/fdp/src/css/fde_csscache.h
+++ b/xfa/src/fdp/src/css/fde_csscache.h
@@ -14,7 +14,6 @@ typedef struct _FDE_CSSCACHEITEM : public CFX_Target {
FX_DWORD dwActivity;
} FDE_CSSCACHEITEM, *FDE_LPCSSCACHEITEM;
class CFDE_CSSStyleSheetCache : public IFDE_CSSStyleSheetCache,
- public CFX_ThreadLock,
public CFX_Target {
public:
CFDE_CSSStyleSheetCache();
diff --git a/xfa/src/fdp/src/css/fde_csssyntax.cpp b/xfa/src/fdp/src/css/fde_csssyntax.cpp
index b546d1046f..15b8dbb23a 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.cpp
+++ b/xfa/src/fdp/src/css/fde_csssyntax.cpp
@@ -444,12 +444,10 @@ int32_t CFDE_CSSTextBuf::LoadFromStream(IFX_Stream* pTxtStream,
if (!ExpandBuf(iMaxChars)) {
return 0;
}
- pTxtStream->Lock();
if (pTxtStream->GetPosition() != iStreamOffset) {
pTxtStream->Seek(FX_STREAMSEEK_Begin, iStreamOffset);
}
m_iDatLen = pTxtStream->ReadString(m_pBuffer, iMaxChars, bEOS);
- pTxtStream->Unlock();
return m_iDatLen;
}
FX_BOOL CFDE_CSSTextBuf::ExpandBuf(int32_t iDesiredSize) {
diff --git a/xfa/src/fdp/src/fde/fde_render.cpp b/xfa/src/fdp/src/fde/fde_render.cpp
index 30e208c387..a3f00acd9e 100644
--- a/xfa/src/fdp/src/fde/fde_render.cpp
+++ b/xfa/src/fdp/src/fde/fde_render.cpp
@@ -58,8 +58,7 @@ IFDE_RenderContext* IFDE_RenderContext::Create() {
return new CFDE_RenderContext;
}
CFDE_RenderContext::CFDE_RenderContext()
- : CFX_ThreadLock(),
- m_eStatus(FDE_RENDERSTATUS_Reset),
+ : m_eStatus(FDE_RENDERSTATUS_Reset),
m_pRenderDevice(NULL),
m_pSolidBrush(NULL),
m_Transform(),
@@ -83,7 +82,7 @@ FX_BOOL CFDE_RenderContext::StartRender(IFDE_RenderDevice* pRenderDevice,
if (pCanvasSet == NULL) {
return FALSE;
}
- Lock();
+
m_eStatus = FDE_RENDERSTATUS_Paused;
m_pRenderDevice = pRenderDevice;
m_Transform = tmDoc2Device;
@@ -91,10 +90,7 @@ FX_BOOL CFDE_RenderContext::StartRender(IFDE_RenderDevice* pRenderDevice,
m_pIterator = IFDE_VisualSetIterator::Create();
FXSYS_assert(m_pIterator != NULL);
}
- FX_BOOL bAttach =
- m_pIterator->AttachCanvas(pCanvasSet) && m_pIterator->FilterObjects();
- Unlock();
- return bAttach;
+ return m_pIterator->AttachCanvas(pCanvasSet) && m_pIterator->FilterObjects();
}
FDE_RENDERSTATUS CFDE_RenderContext::DoRender(IFX_Pause* pPause) {
if (m_pRenderDevice == NULL) {
@@ -103,7 +99,6 @@ FDE_RENDERSTATUS CFDE_RenderContext::DoRender(IFX_Pause* pPause) {
if (m_pIterator == NULL) {
return FDE_RENDERSTATUS_Failed;
}
- Lock();
FDE_RENDERSTATUS eStatus = FDE_RENDERSTATUS_Paused;
CFX_Matrix rm;
rm.SetReverse(m_Transform);
@@ -152,11 +147,9 @@ FDE_RENDERSTATUS CFDE_RenderContext::DoRender(IFX_Pause* pPause) {
break;
}
}
- Unlock();
return m_eStatus = eStatus;
}
void CFDE_RenderContext::StopRender() {
- Lock();
m_eStatus = FDE_RENDERSTATUS_Reset;
m_pRenderDevice = nullptr;
m_Transform.SetIdentity();
@@ -171,7 +164,6 @@ void CFDE_RenderContext::StopRender() {
FX_Free(m_pCharPos);
m_pCharPos = nullptr;
m_iCharPosCount = 0;
- Unlock();
}
void CFDE_RenderContext::RenderText(IFDE_TextSet* pTextSet,
FDE_HVISUALOBJ hText) {
diff --git a/xfa/src/fdp/src/fde/fde_render.h b/xfa/src/fdp/src/fde/fde_render.h
index 50f76f394e..4d9ae42db6 100644
--- a/xfa/src/fdp/src/fde/fde_render.h
+++ b/xfa/src/fdp/src/fde/fde_render.h
@@ -7,9 +7,7 @@
#ifndef XFA_SRC_FDP_SRC_FDE_FDE_RENDER_H_
#define XFA_SRC_FDP_SRC_FDE_FDE_RENDER_H_
-class CFDE_RenderContext;
class CFDE_RenderContext : public IFDE_RenderContext,
- public CFX_ThreadLock,
public CFX_Target {
public:
CFDE_RenderContext();
diff --git a/xfa/src/fdp/src/xml/fde_xml_imp.cpp b/xfa/src/fdp/src/xml/fde_xml_imp.cpp
index e5250fde28..626e2388b4 100644
--- a/xfa/src/fdp/src/xml/fde_xml_imp.cpp
+++ b/xfa/src/fdp/src/xml/fde_xml_imp.cpp
@@ -1515,14 +1515,12 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse() {
}
m_iParsedChars += (m_pEnd - m_pBuffer);
m_iParsedBytes = m_iCurrentPos;
- m_pStream->Lock();
if (m_pStream->GetPosition() != m_iCurrentPos) {
m_pStream->Seek(FX_STREAMSEEK_Begin, m_iCurrentPos);
}
m_iBufferChars =
m_pStream->ReadString(m_pBuffer, m_iXMLPlaneSize, m_bEOS);
iPos = m_pStream->GetPosition();
- m_pStream->Unlock();
if (m_iBufferChars < 1) {
m_iCurrentPos = iStreamLength;
m_dwStatus = FDE_XMLSYNTAXSTATUS_EOS;