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

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

Issue 1810323002: Cache render targets that render to wrapped textures Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 2010 Google Inc. 2 * Copyright 2010 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 GrTypes_DEFINED 8 #ifndef GrTypes_DEFINED
9 #define GrTypes_DEFINED 9 #define GrTypes_DEFINED
10 10
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 * should be verified. 405 * should be verified.
406 */ 406 */
407 kCheckAllocation_GrSurfaceFlag = 0x4, 407 kCheckAllocation_GrSurfaceFlag = 0x4,
408 }; 408 };
409 409
410 GR_MAKE_BITFIELD_OPS(GrSurfaceFlags) 410 GR_MAKE_BITFIELD_OPS(GrSurfaceFlags)
411 411
412 // opaque type for 3D API object handles 412 // opaque type for 3D API object handles
413 typedef intptr_t GrBackendObject; 413 typedef intptr_t GrBackendObject;
414 414
415 enum class GrBackendObjectLifeCycle {
416 /**
417 * The resource is created, owned and freed by Skia.
418 */
419 kInternal,
420 /**
421 * An external resource with ownership transfered into Skia. Skia will free the resource.
422 */
423 kAdopted,
424 /**
425 * An external resource, but Skia does not manage the lifetime of the underl ying backend
426 * 3D API object(s). The client is responsible for freeing those. Used to in ject client-
427 * created GPU resources into Skia (e.g. to render to a client-created textu re).
428 */
429 kBorrowed
430 };
431
415 /** 432 /**
416 * Some textures will be stored such that the upper and left edges of the conten t meet at the 433 * Some textures will be stored such that the upper and left edges of the conten t meet at the
417 * the origin (in texture coord space) and for other textures the lower and left edges meet at 434 * the origin (in texture coord space) and for other textures the lower and left edges meet at
418 * the origin. kDefault_GrSurfaceOrigin sets textures to TopLeft, and render tar gets 435 * the origin. kDefault_GrSurfaceOrigin sets textures to TopLeft, and render tar gets
419 * to BottomLeft. 436 * to BottomLeft.
420 */ 437 */
421 438
422 enum GrSurfaceOrigin { 439 enum GrSurfaceOrigin {
423 kDefault_GrSurfaceOrigin, // DEPRECATED; to be removed 440 kDefault_GrSurfaceOrigin, // DEPRECATED; to be removed
424 kTopLeft_GrSurfaceOrigin, 441 kTopLeft_GrSurfaceOrigin,
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 return 4 * width * height; 701 return 4 * width * height;
685 } 702 }
686 } 703 }
687 704
688 /** 705 /**
689 * This value translates to reseting all the context state for any backend. 706 * This value translates to reseting all the context state for any backend.
690 */ 707 */
691 static const uint32_t kAll_GrBackendState = 0xffffffff; 708 static const uint32_t kAll_GrBackendState = 0xffffffff;
692 709
693 #endif 710 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698