Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2764)

Unified Diff: core/fpdfapi/fpdf_render/fpdf_render.cpp

Issue 2316823002: Maybe avoid a copy in CPDF_RenderStatus::SelectClipPath (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_render/fpdf_render.cpp
diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
index 89667f3a23838dd5df12048528b0bf5a6f700daf..887ea30a427c442987f589c5695669a7dd11f72d 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -653,12 +653,11 @@ FX_BOOL CPDF_RenderStatus::SelectClipPath(const CPDF_PathObject* pPathObj,
CFX_Matrix path_matrix = pPathObj->m_Matrix;
path_matrix.Concat(*pObj2Device);
if (bStroke) {
- CFX_GraphStateData graphState(*pPathObj->m_GraphState.GetObject());
- if (m_Options.m_Flags & RENDER_THINLINE) {
- graphState.m_LineWidth = 0;
- }
+ CFX_GraphState graphState = pPathObj->m_GraphState;
+ if (m_Options.m_Flags & RENDER_THINLINE)
+ graphState.SetLineWidth(0);
return m_pDevice->SetClip_PathStroke(pPathObj->m_Path.GetObject(),
- &path_matrix, &graphState);
+ &path_matrix, graphState.GetObject());
dsinclair 2016/09/07 12:55:40 Is this copy needed or can the CFX_GraphState be p
Tom Sepez 2016/09/07 16:35:11 I'll get to that eventually. Turns out the m_pDev
}
int fill_mode = pPathObj->m_FillType;
if (m_Options.m_Flags & RENDER_NOPATHSMOOTH) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698