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

Side by Side Diff: src/core/SkCanvas.cpp

Issue 644323006: Fix image filters for PDF backend. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add a comment about rendering quality, and reference appropriate skbug Created 6 years, 2 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 | « include/pdf/SkPDFDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 } 926 }
927 927
928 bool isOpaque = !SkToBool(flags & kHasAlphaLayer_SaveFlag); 928 bool isOpaque = !SkToBool(flags & kHasAlphaLayer_SaveFlag);
929 SkImageInfo info = SkImageInfo::MakeN32(ir.width(), ir.height(), 929 SkImageInfo info = SkImageInfo::MakeN32(ir.width(), ir.height(),
930 isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType); 930 isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType);
931 931
932 SkBaseDevice* device; 932 SkBaseDevice* device;
933 if (paint && paint->getImageFilter()) { 933 if (paint && paint->getImageFilter()) {
934 device = this->getDevice(); 934 device = this->getDevice();
935 if (device) { 935 if (device) {
936 device = device->createCompatibleDevice(info); 936 device = device->createCompatibleDeviceForImageFilter(info);
937 } 937 }
938 } else { 938 } else {
939 device = this->createLayerDevice(info); 939 device = this->createLayerDevice(info);
940 } 940 }
941 if (NULL == device) { 941 if (NULL == device) {
942 SkDebugf("Unable to create device for layer."); 942 SkDebugf("Unable to create device for layer.");
943 return count; 943 return count;
944 } 944 }
945 this->setupDevice(device); 945 this->setupDevice(device);
946 946
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 } 2550 }
2551 2551
2552 if (matrix) { 2552 if (matrix) {
2553 canvas->concat(*matrix); 2553 canvas->concat(*matrix);
2554 } 2554 }
2555 } 2555 }
2556 2556
2557 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2557 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2558 fCanvas->restoreToCount(fSaveCount); 2558 fCanvas->restoreToCount(fSaveCount);
2559 } 2559 }
OLDNEW
« no previous file with comments | « include/pdf/SkPDFDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698