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

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

Issue 2330553003: Gamut transformation of the paint color in Ganesh (Closed)
Patch Set: Created 4 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/gpu/GrColorSpaceXform.h ('k') | src/gpu/GrColorSpaceXform.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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 int height() const { return fRenderTarget->height(); } 328 int height() const { return fRenderTarget->height(); }
329 GrPixelConfig config() const { return fRenderTarget->config(); } 329 GrPixelConfig config() const { return fRenderTarget->config(); }
330 int numColorSamples() const { return fRenderTarget->numColorSamples(); } 330 int numColorSamples() const { return fRenderTarget->numColorSamples(); }
331 bool isGammaCorrect() const { return SkToBool(fColorSpace.get()); } 331 bool isGammaCorrect() const { return SkToBool(fColorSpace.get()); }
332 SkSourceGammaTreatment sourceGammaTreatment() const { 332 SkSourceGammaTreatment sourceGammaTreatment() const {
333 return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect 333 return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect
334 : SkSourceGammaTreatment::kIgnore; 334 : SkSourceGammaTreatment::kIgnore;
335 } 335 }
336 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } 336 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; }
337 SkColorSpace* getColorSpace() const { return fColorSpace.get(); } 337 SkColorSpace* getColorSpace() const { return fColorSpace.get(); }
338 GrColorSpaceXform* getColorXformFromSRGB() const { return fColorXformFromSRG B.get(); }
338 GrSurfaceOrigin origin() const { return fRenderTarget->origin(); } 339 GrSurfaceOrigin origin() const { return fRenderTarget->origin(); }
339 340
340 bool wasAbandoned() const; 341 bool wasAbandoned() const;
341 342
342 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } 343 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); }
343 344
344 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture()); } 345 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture()); }
345 346
346 // Provides access to functions that aren't part of the public API. 347 // Provides access to functions that aren't part of the public API.
347 GrDrawContextPriv drawContextPriv(); 348 GrDrawContextPriv drawContextPriv();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 GrDrawingManager* fDrawingManager; 419 GrDrawingManager* fDrawingManager;
419 sk_sp<GrRenderTarget> fRenderTarget; 420 sk_sp<GrRenderTarget> fRenderTarget;
420 421
421 // In MDB-mode the drawTarget can be closed by some other drawContext that h as picked 422 // In MDB-mode the drawTarget can be closed by some other drawContext that h as picked
422 // it up. For this reason, the drawTarget should only ever be accessed via ' getDrawTarget'. 423 // it up. For this reason, the drawTarget should only ever be accessed via ' getDrawTarget'.
423 GrDrawTarget* fDrawTarget; 424 GrDrawTarget* fDrawTarget;
424 GrContext* fContext; 425 GrContext* fContext;
425 GrInstancedPipelineInfo fInstancedPipelineInfo; 426 GrInstancedPipelineInfo fInstancedPipelineInfo;
426 427
427 sk_sp<SkColorSpace> fColorSpace; 428 sk_sp<SkColorSpace> fColorSpace;
429 sk_sp<GrColorSpaceXform> fColorXformFromSRGB;
428 SkSurfaceProps fSurfaceProps; 430 SkSurfaceProps fSurfaceProps;
429 GrAuditTrail* fAuditTrail; 431 GrAuditTrail* fAuditTrail;
430 432
431 // In debug builds we guard against improper thread handling 433 // In debug builds we guard against improper thread handling
432 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) 434 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;)
433 }; 435 };
434 436
435 #endif 437 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrColorSpaceXform.h ('k') | src/gpu/GrColorSpaceXform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698