Avoid extra conversion work in CFX_SkiaDeviceDriver dtor
SyncInternalBitmaps() is self-contained and does all the necessary
bitmap conversions within. So the dtor does not need to do extra work
before calling it. Avoid that and just call SyncInternalBitmaps().
Change-Id: I4050037e8c0915b04cf455cbf62e8a64ace0be3a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/122717
Reviewed-by: Tom Sepez <tsepez@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 1f21d47..4a3f51a 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -761,10 +761,8 @@
CFX_SkiaDeviceDriver::~CFX_SkiaDeviceDriver() {
// Convert and transfer the internal processed result to the original 24 bpp
- // bitmap provided by the render device.
- if (m_pOriginalBitmap && m_pBitmap->ConvertFormat(FXDIB_Format::kRgb)) {
- SyncInternalBitmaps();
- }
+ // bitmap provided by the render device if needed.
+ SyncInternalBitmaps();
}
bool CFX_SkiaDeviceDriver::DrawDeviceText(