summaryrefslogtreecommitdiff
path: root/core/fxge/skia
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/skia')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 55fe580086..5f874e5ffb 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -7,6 +7,7 @@
#include <vector>
#include "core/fxcodec/include/fx_codec.h"
+#include "core/fxcrt/include/fx_memory.h"
#include "core/fpdfapi/fpdf_page/cpdf_shadingpattern.h"
#include "core/fpdfapi/fpdf_page/pageint.h"
@@ -1461,8 +1462,7 @@ CFX_FxgeDevice::CFX_FxgeDevice() {
}
SkPictureRecorder* CFX_FxgeDevice::CreateRecorder(int size_x, int size_y) {
- CFX_SkiaDeviceDriver* skDriver = new CFX_SkiaDeviceDriver(size_x, size_y);
- SetDeviceDriver(skDriver);
+ SetDeviceDriver(WrapUnique(new CFX_SkiaDeviceDriver(size_x, size_y)));
return skDriver->GetRecorder();
}
@@ -1473,8 +1473,8 @@ bool CFX_FxgeDevice::Attach(CFX_DIBitmap* pBitmap,
if (!pBitmap)
return false;
SetBitmap(pBitmap);
- SetDeviceDriver(new CFX_SkiaDeviceDriver(pBitmap, bRgbByteOrder, pOriDevice,
- bGroupKnockout));
+ SetDeviceDriver(WrapUnique(new CFX_SkiaDeviceDriver(
+ pBitmap, bRgbByteOrder, pOriDevice, bGroupKnockout)));
return true;
}