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

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: 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
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 if (!fDevice->imageInfo().gammaCloseToSRGB()) {
msarett 2016/06/20 19:41:05 !gammaCloseToSRGB() can mean "linear" or "wacky".
reed1 2016/06/20 21:05:53 Will mark this with a TODO
1565 flags |= SkPaint::kFakeGamma_ScalerContextFlag; 1565 flags |= SkPaint::kFakeGamma_ScalerContextFlag;
1566 } 1566 }
1567 return flags; 1567 return flags;
1568 } 1568 }
1569 1569
1570 void SkDraw::drawText(const char text[], size_t byteLength, 1570 void SkDraw::drawText(const char text[], size_t byteLength,
1571 SkScalar x, SkScalar y, const SkPaint& paint) const { 1571 SkScalar x, SkScalar y, const SkPaint& paint) const {
1572 SkASSERT(byteLength == 0 || text != nullptr); 1572 SkASSERT(byteLength == 0 || text != nullptr);
1573 1573
1574 SkDEBUGCODE(this->validate();) 1574 SkDEBUGCODE(this->validate();)
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 mask->fImage = SkMask::AllocImage(size); 2080 mask->fImage = SkMask::AllocImage(size);
2081 memset(mask->fImage, 0, mask->computeImageSize()); 2081 memset(mask->fImage, 0, mask->computeImageSize());
2082 } 2082 }
2083 2083
2084 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2084 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2085 draw_into_mask(*mask, devPath, style); 2085 draw_into_mask(*mask, devPath, style);
2086 } 2086 }
2087 2087
2088 return true; 2088 return true;
2089 } 2089 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698