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

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

Issue 1810563002: Move xfa/include/fxgraphics/fx_graphics.h to xfa/fxgraphics. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "xfa/fxgraphics/cagg_graphics.h"
8
9 CAGG_Graphics::CAGG_Graphics() : m_owner(nullptr) {}
10
11 FX_ERR CAGG_Graphics::Create(CFX_Graphics* owner,
12 int32_t width,
13 int32_t height,
14 FXDIB_Format format) {
15 if (owner->m_renderDevice)
16 return FX_ERR_Parameter_Invalid;
17 if (m_owner)
18 return FX_ERR_Property_Invalid;
19
20 CFX_FxgeDevice* device = new CFX_FxgeDevice;
21 device->Create(width, height, format);
22 m_owner = owner;
23 m_owner->m_renderDevice = device;
24 m_owner->m_renderDevice->GetBitmap()->Clear(0xFFFFFFFF);
25 return FX_ERR_Succeeded;
26 }
27
28 CAGG_Graphics::~CAGG_Graphics() {
29 if (m_owner->m_renderDevice)
30 delete (CFX_FxgeDevice*)m_owner->m_renderDevice;
31 m_owner = nullptr;
32 }
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