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

Side by Side Diff: core/fxge/ge/cfx_graphstatedata.cpp

Issue 2223213002: Refactor fx_ge part 3 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « core/fxge/dib/fx_dib_main.cpp ('k') | core/fxge/ge/cfx_pathdata.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/fxge/include/cfx_graphstatedata.h"
8
9 #include "core/fxcrt/include/fx_memory.h"
7 #include "core/fxcrt/include/fx_system.h" 10 #include "core/fxcrt/include/fx_system.h"
8 #include "core/fxge/include/fx_ge.h"
9 11
10 CFX_GraphStateData::CFX_GraphStateData() 12 CFX_GraphStateData::CFX_GraphStateData()
11 : m_LineCap(LineCapButt), 13 : m_LineCap(LineCapButt),
12 m_DashCount(0), 14 m_DashCount(0),
13 m_DashArray(nullptr), 15 m_DashArray(nullptr),
14 m_DashPhase(0), 16 m_DashPhase(0),
15 m_LineJoin(LineJoinMiter), 17 m_LineJoin(LineJoinMiter),
16 m_MiterLimit(10 * 1.0f), 18 m_MiterLimit(10 * 1.0f),
17 m_LineWidth(1.0f) {} 19 m_LineWidth(1.0f) {}
18 20
(...skipping 18 matching lines...) Expand all
37 } 39 }
38 40
39 CFX_GraphStateData::~CFX_GraphStateData() { 41 CFX_GraphStateData::~CFX_GraphStateData() {
40 FX_Free(m_DashArray); 42 FX_Free(m_DashArray);
41 } 43 }
42 44
43 void CFX_GraphStateData::SetDashCount(int count) { 45 void CFX_GraphStateData::SetDashCount(int count) {
44 FX_Free(m_DashArray); 46 FX_Free(m_DashArray);
45 m_DashArray = nullptr; 47 m_DashArray = nullptr;
46 m_DashCount = count; 48 m_DashCount = count;
47 if (count == 0) { 49 if (count == 0)
48 return; 50 return;
49 }
50 m_DashArray = FX_Alloc(FX_FLOAT, count); 51 m_DashArray = FX_Alloc(FX_FLOAT, count);
51 } 52 }
OLDNEW
« no previous file with comments | « core/fxge/dib/fx_dib_main.cpp ('k') | core/fxge/ge/cfx_pathdata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698