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

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

Issue 1214853025: Propagate SkSurfaceProps when known (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | src/device/xps/SkXPSDevice.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 2006 The Android Open Source Project 2 * Copyright 2006 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 #define __STDC_LIMIT_MACROS 7 #define __STDC_LIMIT_MACROS
8 8
9 #include "SkDraw.h" 9 #include "SkDraw.h"
10 #include "SkBlitter.h" 10 #include "SkBlitter.h"
(...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 SkScalar matrixScale = paint.setupForAsPaths(); 1687 SkScalar matrixScale = paint.setupForAsPaths();
1688 1688
1689 SkMatrix matrix; 1689 SkMatrix matrix;
1690 matrix.setScale(matrixScale, matrixScale); 1690 matrix.setScale(matrixScale, matrixScale);
1691 1691
1692 // Temporarily jam in kFill, so we only ever ask for the raw outline from th e cache. 1692 // Temporarily jam in kFill, so we only ever ask for the raw outline from th e cache.
1693 paint.setStyle(SkPaint::kFill_Style); 1693 paint.setStyle(SkPaint::kFill_Style);
1694 paint.setPathEffect(NULL); 1694 paint.setPathEffect(NULL);
1695 1695
1696 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); 1696 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc();
1697 SkAutoGlyphCache autoCache(paint, NULL, NULL); 1697 SkAutoGlyphCache autoCache(paint, &fDevice->surfaceProps(), NULL);
1698 SkGlyphCache* cache = autoCache.getCache(); 1698 SkGlyphCache* cache = autoCache.getCache();
1699 1699
1700 const char* stop = text + byteLength; 1700 const char* stop = text + byteLength;
1701 SkTextAlignProc alignProc(paint.getTextAlign()); 1701 SkTextAlignProc alignProc(paint.getTextAlign());
1702 SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition); 1702 SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition);
1703 1703
1704 // Now restore the original settings, so we "draw" with whatever style/strok ing. 1704 // Now restore the original settings, so we "draw" with whatever style/strok ing.
1705 paint.setStyle(origPaint.getStyle()); 1705 paint.setStyle(origPaint.getStyle());
1706 paint.setPathEffect(origPaint.getPathEffect()); 1706 paint.setPathEffect(origPaint.getPathEffect());
1707 1707
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 mask->fImage = SkMask::AllocImage(size); 2260 mask->fImage = SkMask::AllocImage(size);
2261 memset(mask->fImage, 0, mask->computeImageSize()); 2261 memset(mask->fImage, 0, mask->computeImageSize());
2262 } 2262 }
2263 2263
2264 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2264 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2265 draw_into_mask(*mask, devPath, style); 2265 draw_into_mask(*mask, devPath, style);
2266 } 2266 }
2267 2267
2268 return true; 2268 return true;
2269 } 2269 }
OLDNEW
« no previous file with comments | « no previous file | src/device/xps/SkXPSDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698