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

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

Issue 1345903002: Revert of Parallel cache - preliminary (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « include/ports/SkAtomics_sync.h ('k') | src/core/SkGlyph.h » ('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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 mask.fBounds.set(left, top, right, bottom); 1469 mask.fBounds.set(left, top, right, bottom);
1470 1470
1471 // this extra test is worth it, assuming that most of the time it succeeds 1471 // this extra test is worth it, assuming that most of the time it succeeds
1472 // since we can avoid writing to storage 1472 // since we can avoid writing to storage
1473 if (!state.fClipBounds.containsNoEmptyCheck(left, top, right, bottom)) { 1473 if (!state.fClipBounds.containsNoEmptyCheck(left, top, right, bottom)) {
1474 if (!storage.intersectNoEmptyCheck(mask.fBounds, state.fClipBounds)) 1474 if (!storage.intersectNoEmptyCheck(mask.fBounds, state.fClipBounds))
1475 return; 1475 return;
1476 bounds = &storage; 1476 bounds = &storage;
1477 } 1477 }
1478 1478
1479 uint8_t*aa = (uint8_t*)state.fCache->findImage(glyph); 1479 uint8_t* aa = (uint8_t*)glyph.fImage;
1480 if (nullptr == aa) { 1480 if (nullptr == aa) {
1481 return; // can't rasterize glyph 1481 aa = (uint8_t*)state.fCache->findImage(glyph);
1482 if (nullptr == aa) {
1483 return; // can't rasterize glyph
1484 }
1482 } 1485 }
1483 1486
1484
1485 mask.fRowBytes = glyph.rowBytes(); 1487 mask.fRowBytes = glyph.rowBytes();
1486 mask.fFormat = static_cast<SkMask::Format>(glyph.fMaskFormat); 1488 mask.fFormat = static_cast<SkMask::Format>(glyph.fMaskFormat);
1487 mask.fImage = aa; 1489 mask.fImage = aa;
1488 state.blitMask(mask, *bounds); 1490 state.blitMask(mask, *bounds);
1489 } 1491 }
1490 1492
1491 static void D1G_RgnClip(const SkDraw1Glyph& state, Sk48Dot16 fx, Sk48Dot16 fy, c onst SkGlyph& glyph) { 1493 static void D1G_RgnClip(const SkDraw1Glyph& state, Sk48Dot16 fx, Sk48Dot16 fy, c onst SkGlyph& glyph) {
1492 int left = Sk48Dot16FloorToInt(fx); 1494 int left = Sk48Dot16FloorToInt(fx);
1493 int top = Sk48Dot16FloorToInt(fy); 1495 int top = Sk48Dot16FloorToInt(fy);
1494 SkASSERT(glyph.fWidth > 0 && glyph.fHeight > 0); 1496 SkASSERT(glyph.fWidth > 0 && glyph.fHeight > 0);
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
2255 mask->fImage = SkMask::AllocImage(size); 2257 mask->fImage = SkMask::AllocImage(size);
2256 memset(mask->fImage, 0, mask->computeImageSize()); 2258 memset(mask->fImage, 0, mask->computeImageSize());
2257 } 2259 }
2258 2260
2259 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2261 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2260 draw_into_mask(*mask, devPath, style); 2262 draw_into_mask(*mask, devPath, style);
2261 } 2263 }
2262 2264
2263 return true; 2265 return true;
2264 } 2266 }
OLDNEW
« no previous file with comments | « include/ports/SkAtomics_sync.h ('k') | src/core/SkGlyph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698