diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/fxge/skia/fx_skia_device.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 2d60f74e86..d0fe11d9b6 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -1990,12 +1990,22 @@ uint8_t* CFX_SkiaDeviceDriver::GetBuffer() const { } bool CFX_SkiaDeviceDriver::GetClipBox(FX_RECT* pRect) { +#ifdef _SKIA_SUPPORT_PATHS_ + if (!m_pClipRgn) { + pRect->left = pRect->top = 0; + pRect->right = GetDeviceCaps(FXDC_PIXEL_WIDTH); + pRect->bottom = GetDeviceCaps(FXDC_PIXEL_HEIGHT); + return true; + } + *pRect = m_pClipRgn->GetBox(); +#else // TODO(caryclark) call m_canvas->getClipDeviceBounds() instead pRect->left = 0; pRect->top = 0; const SkImageInfo& canvasSize = m_pCanvas->imageInfo(); pRect->right = canvasSize.width(); pRect->bottom = canvasSize.height(); +#endif return true; } |