| OLD | NEW |
| 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 /** | 445 /** |
| 446 * Describes a surface to be created. | 446 * Describes a surface to be created. |
| 447 */ | 447 */ |
| 448 struct GrSurfaceDesc { | 448 struct GrSurfaceDesc { |
| 449 GrSurfaceDesc() | 449 GrSurfaceDesc() |
| 450 : fFlags(kNone_GrSurfaceFlags) | 450 : fFlags(kNone_GrSurfaceFlags) |
| 451 , fOrigin(kDefault_GrSurfaceOrigin) | 451 , fOrigin(kDefault_GrSurfaceOrigin) |
| 452 , fWidth(0) | 452 , fWidth(0) |
| 453 , fHeight(0) | 453 , fHeight(0) |
| 454 , fConfig(kUnknown_GrPixelConfig) | 454 , fConfig(kUnknown_GrPixelConfig) |
| 455 , fSampleCnt(0) { | 455 , fSampleCnt(0) |
| 456 , fIsMipMapped(false) { |
| 456 } | 457 } |
| 457 | 458 |
| 458 GrSurfaceFlags fFlags; //!< bitfield of TextureFlags | 459 GrSurfaceFlags fFlags; //!< bitfield of TextureFlags |
| 459 GrSurfaceOrigin fOrigin; //!< origin of the texture | 460 GrSurfaceOrigin fOrigin; //!< origin of the texture |
| 460 int fWidth; //!< Width of the texture | 461 int fWidth; //!< Width of the texture |
| 461 int fHeight; //!< Height of the texture | 462 int fHeight; //!< Height of the texture |
| 462 | 463 |
| 463 /** | 464 /** |
| 464 * Format of source data of the texture. Not guaranteed to be the same as | 465 * Format of source data of the texture. Not guaranteed to be the same as |
| 465 * internal format used by 3D API. | 466 * internal format used by 3D API. |
| 466 */ | 467 */ |
| 467 GrPixelConfig fConfig; | 468 GrPixelConfig fConfig; |
| 468 | 469 |
| 469 /** | 470 /** |
| 470 * The number of samples per pixel or 0 to disable full scene AA. This only | 471 * The number of samples per pixel or 0 to disable full scene AA. This only |
| 471 * applies if the kRenderTarget_GrSurfaceFlag is set. The actual number | 472 * applies if the kRenderTarget_GrSurfaceFlag is set. The actual number |
| 472 * of samples may not exactly match the request. The request will be rounded | 473 * of samples may not exactly match the request. The request will be rounded |
| 473 * up to the next supported sample count, or down if it is larger than the | 474 * up to the next supported sample count, or down if it is larger than the |
| 474 * max supported count. | 475 * max supported count. |
| 475 */ | 476 */ |
| 476 int fSampleCnt; | 477 int fSampleCnt; |
| 478 |
| 479 bool fIsMipMapped; //!< Indicates if the texture has mipma
ps |
| 477 }; | 480 }; |
| 478 | 481 |
| 479 // Legacy alias | 482 // Legacy alias |
| 480 typedef GrSurfaceDesc GrTextureDesc; | 483 typedef GrSurfaceDesc GrTextureDesc; |
| 481 | 484 |
| 482 /** | 485 /** |
| 483 * Clips are composed from these objects. | 486 * Clips are composed from these objects. |
| 484 */ | 487 */ |
| 485 enum GrClipType { | 488 enum GrClipType { |
| 486 kRect_ClipType, | 489 kRect_ClipType, |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 return 4 * width * height; | 641 return 4 * width * height; |
| 639 } | 642 } |
| 640 } | 643 } |
| 641 | 644 |
| 642 /** | 645 /** |
| 643 * This value translates to reseting all the context state for any backend. | 646 * This value translates to reseting all the context state for any backend. |
| 644 */ | 647 */ |
| 645 static const uint32_t kAll_GrBackendState = 0xffffffff; | 648 static const uint32_t kAll_GrBackendState = 0xffffffff; |
| 646 | 649 |
| 647 #endif | 650 #endif |
| OLD | NEW |