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

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

Issue 2223213002: Refactor fx_ge part 3 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2016 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_pathdata.h" 7 #include "core/fxge/include/cfx_pathdata.h"
8 8
9 #include "core/fxcrt/include/fx_system.h" 9 #include "core/fxcrt/include/fx_system.h"
10 #include "core/fxge/include/fx_ge.h"
11 #include "third_party/base/numerics/safe_math.h" 10 #include "third_party/base/numerics/safe_math.h"
12 11
13 CFX_PathData::CFX_PathData() 12 CFX_PathData::CFX_PathData()
14 : m_PointCount(0), m_pPoints(nullptr), m_AllocCount(0) {} 13 : m_PointCount(0), m_pPoints(nullptr), m_AllocCount(0) {}
15 14
16 CFX_PathData::~CFX_PathData() { 15 CFX_PathData::~CFX_PathData() {
17 FX_Free(m_pPoints); 16 FX_Free(m_pPoints);
18 } 17 }
19 18
20 void CFX_PathData::SetPointCount(int nPoints) { 19 void CFX_PathData::SetPointCount(int nPoints) {
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 pRect->top = y[2]; 523 pRect->top = y[2];
525 pRect->Normalize(); 524 pRect->Normalize();
526 } 525 }
527 return TRUE; 526 return TRUE;
528 } 527 }
529 528
530 void CFX_PathData::Copy(const CFX_PathData& src) { 529 void CFX_PathData::Copy(const CFX_PathData& src) {
531 SetPointCount(src.m_PointCount); 530 SetPointCount(src.m_PointCount);
532 FXSYS_memcpy(m_pPoints, src.m_pPoints, sizeof(FX_PATHPOINT) * m_PointCount); 531 FXSYS_memcpy(m_pPoints, src.m_pPoints, sizeof(FX_PATHPOINT) * m_PointCount);
533 } 532 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698