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

Unified Diff: src/core/SkCanvas.cpp

Issue 1144153007: Fallback bitmap devices should observe the computed pixel geometry (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 43d5bc923c40dbcd675296bfaf86a2a53613a57d..26b76df9beb1515a2b64987bd2c7726c3cdda1f1 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -10,6 +10,7 @@
#include "SkBitmapDevice.h"
#include "SkColorFilter.h"
#include "SkDeviceImageFilterProxy.h"
+#include "SkDeviceProperties.h"
#include "SkDraw.h"
#include "SkDrawable.h"
#include "SkDrawFilter.h"
@@ -1037,7 +1038,8 @@ void SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint, Sav
SkBaseDevice* newDev = device->onCreateDevice(createInfo, paint);
if (NULL == newDev) {
// If onCreateDevice didn't succeed, try raster (e.g. PDF couldn't handle the paint)
- newDev = SkBitmapDevice::Create(createInfo.fInfo);
+ const SkDeviceProperties deviceProps(createInfo.fPixelGeometry);
+ newDev = SkBitmapDevice::Create(createInfo.fInfo, &deviceProps);
if (NULL == newDev) {
SkErrorInternals::SetError(kInternalError_SkError,
"Unable to create device for layer.");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698