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

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

Issue 577023002: hide deviceproperties, prepare the way for surfaceprops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix SkTrackDevice.h Created 6 years, 3 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 | « src/core/SkDeviceProperties.h ('k') | src/gpu/SkGpuDevice.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 7
8 #include "SkDraw.h" 8 #include "SkDraw.h"
9 #include "SkBlitter.h" 9 #include "SkBlitter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 1569
1570 // SkScalarRec doesn't currently have a way of representing hairline stroke and 1570 // SkScalarRec doesn't currently have a way of representing hairline stroke and
1571 // will fill if its frame-width is 0. 1571 // will fill if its frame-width is 0.
1572 if (ShouldDrawTextAsPaths(paint, *fMatrix)) { 1572 if (ShouldDrawTextAsPaths(paint, *fMatrix)) {
1573 this->drawText_asPaths(text, byteLength, x, y, paint); 1573 this->drawText_asPaths(text, byteLength, x, y, paint);
1574 return; 1574 return;
1575 } 1575 }
1576 1576
1577 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); 1577 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc();
1578 1578
1579 SkAutoGlyphCache autoCache(paint, &fDevice->fLeakyProperties, fMatrix); 1579 SkAutoGlyphCache autoCache(paint, &fDevice->getLeakyProperties(), fMatrix );
1580 SkGlyphCache* cache = autoCache.getCache(); 1580 SkGlyphCache* cache = autoCache.getCache();
1581 1581
1582 // transform our starting point 1582 // transform our starting point
1583 { 1583 {
1584 SkPoint loc; 1584 SkPoint loc;
1585 fMatrix->mapXY(x, y, &loc); 1585 fMatrix->mapXY(x, y, &loc);
1586 x = loc.fX; 1586 x = loc.fX;
1587 y = loc.fY; 1587 y = loc.fY;
1588 } 1588 }
1589 1589
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 return; 1717 return;
1718 } 1718 }
1719 1719
1720 if (ShouldDrawTextAsPaths(paint, *fMatrix)) { 1720 if (ShouldDrawTextAsPaths(paint, *fMatrix)) {
1721 this->drawPosText_asPaths(text, byteLength, pos, constY, 1721 this->drawPosText_asPaths(text, byteLength, pos, constY,
1722 scalarsPerPosition, paint); 1722 scalarsPerPosition, paint);
1723 return; 1723 return;
1724 } 1724 }
1725 1725
1726 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); 1726 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc();
1727 SkAutoGlyphCache autoCache(paint, &fDevice->fLeakyProperties, fMatrix); 1727 SkAutoGlyphCache autoCache(paint, &fDevice->getLeakyProperties(), fMatrix );
1728 SkGlyphCache* cache = autoCache.getCache(); 1728 SkGlyphCache* cache = autoCache.getCache();
1729 1729
1730 SkAAClipBlitterWrapper wrapper; 1730 SkAAClipBlitterWrapper wrapper;
1731 SkAutoBlitterChoose blitterChooser; 1731 SkAutoBlitterChoose blitterChooser;
1732 SkBlitter* blitter = NULL; 1732 SkBlitter* blitter = NULL;
1733 if (needsRasterTextBlit(*this)) { 1733 if (needsRasterTextBlit(*this)) {
1734 blitterChooser.choose(*fBitmap, *fMatrix, paint); 1734 blitterChooser.choose(*fBitmap, *fMatrix, paint);
1735 blitter = blitterChooser.get(); 1735 blitter = blitterChooser.get();
1736 if (fRC->isAA()) { 1736 if (fRC->isAA()) {
1737 wrapper.init(*fRC, blitter); 1737 wrapper.init(*fRC, blitter);
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2378 mask->fImage = SkMask::AllocImage(size); 2378 mask->fImage = SkMask::AllocImage(size);
2379 memset(mask->fImage, 0, mask->computeImageSize()); 2379 memset(mask->fImage, 0, mask->computeImageSize());
2380 } 2380 }
2381 2381
2382 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2382 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2383 draw_into_mask(*mask, devPath, style); 2383 draw_into_mask(*mask, devPath, style);
2384 } 2384 }
2385 2385
2386 return true; 2386 return true;
2387 } 2387 }
OLDNEW
« no previous file with comments | « src/core/SkDeviceProperties.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698