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

Side by Side Diff: xfa/fxgraphics/cagg_graphics.cpp

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
Patch Set: Created 4 years, 7 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 | « xfa/fxgraphics/cagg_graphics.h ('k') | xfa/fxgraphics/cfx_color.h » ('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 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 "xfa/fxgraphics/cagg_graphics.h" 7 #include "xfa/fxgraphics/cagg_graphics.h"
8 8
9 CAGG_Graphics::CAGG_Graphics() : m_owner(nullptr) {} 9 CAGG_Graphics::CAGG_Graphics() : m_owner(nullptr) {}
10 10
11 FX_ERR CAGG_Graphics::Create(CFX_Graphics* owner, 11 FWL_Error CAGG_Graphics::Create(CFX_Graphics* owner,
12 int32_t width, 12 int32_t width,
13 int32_t height, 13 int32_t height,
14 FXDIB_Format format) { 14 FXDIB_Format format) {
15 if (owner->m_renderDevice) 15 if (owner->m_renderDevice)
16 return FX_ERR_Parameter_Invalid; 16 return FWL_Error::ParameterInvalid;
17 if (m_owner) 17 if (m_owner)
18 return FX_ERR_Property_Invalid; 18 return FWL_Error::PropertyInvalid;
19 19
20 CFX_FxgeDevice* device = new CFX_FxgeDevice; 20 CFX_FxgeDevice* device = new CFX_FxgeDevice;
21 device->Create(width, height, format); 21 device->Create(width, height, format);
22 m_owner = owner; 22 m_owner = owner;
23 m_owner->m_renderDevice = device; 23 m_owner->m_renderDevice = device;
24 m_owner->m_renderDevice->GetBitmap()->Clear(0xFFFFFFFF); 24 m_owner->m_renderDevice->GetBitmap()->Clear(0xFFFFFFFF);
25 return FX_ERR_Succeeded; 25 return FWL_Error::Succeeded;
26 } 26 }
27 27
28 CAGG_Graphics::~CAGG_Graphics() { 28 CAGG_Graphics::~CAGG_Graphics() {
29 delete m_owner->m_renderDevice; 29 delete m_owner->m_renderDevice;
30 } 30 }
OLDNEW
« no previous file with comments | « xfa/fxgraphics/cagg_graphics.h ('k') | xfa/fxgraphics/cfx_color.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698