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

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

Issue 2187573002: Reduce usage of MakeRenderTargetDirect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up 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 | « include/core/SkSurface.h ('k') | src/gpu/SkGpuDevice.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 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 fSurfaceProps.isGammaCorrect(); }
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 GrSurfaceOrigin origin() const { return fRenderTarget->origin(); }
284 285
285 bool wasAbandoned() const; 286 bool wasAbandoned() const;
286 287
287 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } 288 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); }
288 289
289 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } 290 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; }
290 291
291 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture()); } 292 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture()); }
292 293
293 // Provides access to functions that aren't part of the public API. 294 // Provides access to functions that aren't part of the public API.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 373
373 sk_sp<SkColorSpace> fColorSpace; 374 sk_sp<SkColorSpace> fColorSpace;
374 SkSurfaceProps fSurfaceProps; 375 SkSurfaceProps fSurfaceProps;
375 GrAuditTrail* fAuditTrail; 376 GrAuditTrail* fAuditTrail;
376 377
377 // In debug builds we guard against improper thread handling 378 // In debug builds we guard against improper thread handling
378 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) 379 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;)
379 }; 380 };
380 381
381 #endif 382 #endif
OLDNEW
« no previous file with comments | « include/core/SkSurface.h ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698