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

Side by Side Diff: include/gpu/GrDrawContext.h

Issue 2186633002: Remove all usage of SkSurfaceProps::isGammaCorrect() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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/effects/SkBlurImageFilter.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 2015 Google Inc. 2 * Copyright 2015 Google Inc.
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 #ifndef GrDrawContext_DEFINED 8 #ifndef GrDrawContext_DEFINED
9 #define GrDrawContext_DEFINED 9 #define GrDrawContext_DEFINED
10 10
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 bool mustUseHWAA(const GrPaint& paint) const { 268 bool mustUseHWAA(const GrPaint& paint) const {
269 return paint.isAntiAlias() && fRenderTarget->isUnifiedMultisampled(); 269 return paint.isAntiAlias() && fRenderTarget->isUnifiedMultisampled();
270 } 270 }
271 271
272 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } 272 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); }
273 int width() const { return fRenderTarget->width(); } 273 int width() const { return fRenderTarget->width(); }
274 int height() const { return fRenderTarget->height(); } 274 int height() const { return fRenderTarget->height(); }
275 GrPixelConfig config() const { return fRenderTarget->config(); } 275 GrPixelConfig config() const { return fRenderTarget->config(); }
276 int numColorSamples() const { return fRenderTarget->numColorSamples(); } 276 int numColorSamples() const { return fRenderTarget->numColorSamples(); }
277 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } 277 bool isGammaCorrect() const { return SkToBool(fColorSpace.get()); }
278 SkSourceGammaTreatment sourceGammaTreatment() const { 278 SkSourceGammaTreatment sourceGammaTreatment() const {
279 return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect 279 return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect
280 : SkSourceGammaTreatment::kIgnore; 280 : SkSourceGammaTreatment::kIgnore;
281 } 281 }
282 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } 282 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; }
283 SkColorSpace* getColorSpace() const { return fColorSpace.get(); } 283 SkColorSpace* getColorSpace() const { return fColorSpace.get(); }
284 284
285 bool wasAbandoned() const; 285 bool wasAbandoned() const;
286 286
287 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } 287 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 372
373 sk_sp<SkColorSpace> fColorSpace; 373 sk_sp<SkColorSpace> fColorSpace;
374 SkSurfaceProps fSurfaceProps; 374 SkSurfaceProps fSurfaceProps;
375 GrAuditTrail* fAuditTrail; 375 GrAuditTrail* fAuditTrail;
376 376
377 // In debug builds we guard against improper thread handling 377 // In debug builds we guard against improper thread handling
378 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) 378 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;)
379 }; 379 };
380 380
381 #endif 381 #endif
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698