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

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

Issue 2086583002: update callers to not use SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rm flag instead of commenting it out Created 4 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 unified diff | Download patch
« no previous file with comments | « src/core/SkColorShader.cpp ('k') | src/core/SkLinearBitmapPipeline.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 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 const SkRegion* const fClip; 1554 const SkRegion* const fClip;
1555 const SkDraw& fDraw; 1555 const SkDraw& fDraw;
1556 const SkPaint& fPaint; 1556 const SkPaint& fPaint;
1557 const SkIRect fClipBounds; 1557 const SkIRect fClipBounds;
1558 }; 1558 };
1559 1559
1560 //////////////////////////////////////////////////////////////////////////////// //////////////////// 1560 //////////////////////////////////////////////////////////////////////////////// ////////////////////
1561 1561
1562 uint32_t SkDraw::scalerContextFlags() const { 1562 uint32_t SkDraw::scalerContextFlags() const {
1563 uint32_t flags = SkPaint::kBoostContrast_ScalerContextFlag; 1563 uint32_t flags = SkPaint::kBoostContrast_ScalerContextFlag;
1564 if (fDevice->imageInfo().isLinear()) { 1564 // TODO: how should we handle non-srgb, non-linear gamma?
1565 if (!fDevice->imageInfo().gammaCloseToSRGB()) {
1565 flags |= SkPaint::kFakeGamma_ScalerContextFlag; 1566 flags |= SkPaint::kFakeGamma_ScalerContextFlag;
1566 } 1567 }
1567 return flags; 1568 return flags;
1568 } 1569 }
1569 1570
1570 void SkDraw::drawText(const char text[], size_t byteLength, 1571 void SkDraw::drawText(const char text[], size_t byteLength,
1571 SkScalar x, SkScalar y, const SkPaint& paint) const { 1572 SkScalar x, SkScalar y, const SkPaint& paint) const {
1572 SkASSERT(byteLength == 0 || text != nullptr); 1573 SkASSERT(byteLength == 0 || text != nullptr);
1573 1574
1574 SkDEBUGCODE(this->validate();) 1575 SkDEBUGCODE(this->validate();)
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 mask->fImage = SkMask::AllocImage(size); 2081 mask->fImage = SkMask::AllocImage(size);
2081 memset(mask->fImage, 0, mask->computeImageSize()); 2082 memset(mask->fImage, 0, mask->computeImageSize());
2082 } 2083 }
2083 2084
2084 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2085 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2085 draw_into_mask(*mask, devPath, style); 2086 draw_into_mask(*mask, devPath, style);
2086 } 2087 }
2087 2088
2088 return true; 2089 return true;
2089 } 2090 }
OLDNEW
« no previous file with comments | « src/core/SkColorShader.cpp ('k') | src/core/SkLinearBitmapPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698