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

Side by Side Diff: src/gpu/GrGpu.h

Issue 2093943002: Have gpu createTestingOlyBackendTexture know if it is a render target or not (Closed) Base URL: https://skia.googlesource.com/skia.git@moreUnitTests
Patch Set: Have gpu createTestingOlyBackendTexture know if it is a render target or not 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 | « no previous file | src/gpu/gl/GrGLGpu.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 2011 Google Inc. 2 * Copyright 2011 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 GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 void incNumFailedDraws() {} 416 void incNumFailedDraws() {}
417 #endif 417 #endif
418 }; 418 };
419 419
420 Stats* stats() { return &fStats; } 420 Stats* stats() { return &fStats; }
421 421
422 /** Creates a texture directly in the backend API without wrapping it in a G rTexture. This is 422 /** Creates a texture directly in the backend API without wrapping it in a G rTexture. This is
423 only to be used for testing (particularly for testing the methods that i mport an externally 423 only to be used for testing (particularly for testing the methods that i mport an externally
424 created texture into Skia. Must be matched with a call to deleteTestingO nlyTexture(). */ 424 created texture into Skia. Must be matched with a call to deleteTestingO nlyTexture(). */
425 virtual GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w, int h, 425 virtual GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w, int h,
426 GrPixelConfig config ) = 0; 426 GrPixelConfig config ,
427 bool isRenderTarget = false) = 0;
427 /** Check a handle represents an actual texture in the backend API that has not been freed. */ 428 /** Check a handle represents an actual texture in the backend API that has not been freed. */
428 virtual bool isTestingOnlyBackendTexture(GrBackendObject) const = 0; 429 virtual bool isTestingOnlyBackendTexture(GrBackendObject) const = 0;
429 /** If ownership of the backend texture has been transferred pass true for a bandonTexture. This 430 /** If ownership of the backend texture has been transferred pass true for a bandonTexture. This
430 will do any necessary cleanup of the handle without freeing the texture in the backend 431 will do any necessary cleanup of the handle without freeing the texture in the backend
431 API. */ 432 API. */
432 virtual void deleteTestingOnlyBackendTexture(GrBackendObject, 433 virtual void deleteTestingOnlyBackendTexture(GrBackendObject,
433 bool abandonTexture = false) = 0; 434 bool abandonTexture = false) = 0;
434 435
435 // width and height may be larger than rt (if underlying API allows it). 436 // width and height may be larger than rt (if underlying API allows it).
436 // Returns nullptr if compatible sb could not be created, otherwise the call er owns the ref on 437 // Returns nullptr if compatible sb could not be created, otherwise the call er owns the ref on
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 SkTArray<const MultisampleSpecs*, true> fMultisa mpleSpecsMap; 576 SkTArray<const MultisampleSpecs*, true> fMultisa mpleSpecsMap;
576 GrTAllocator<MultisampleSpecs> fMultisa mpleSpecsAllocator; 577 GrTAllocator<MultisampleSpecs> fMultisa mpleSpecsAllocator;
577 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. 578 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
578 GrContext* fContext ; 579 GrContext* fContext ;
579 580
580 friend class GrPathRendering; 581 friend class GrPathRendering;
581 typedef SkRefCnt INHERITED; 582 typedef SkRefCnt INHERITED;
582 }; 583 };
583 584
584 #endif 585 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698