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

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

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Cleaning up the allocated SkMipMap object. Created 4 years, 11 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 /** 425 /**
426 * Describes a surface to be created. 426 * Describes a surface to be created.
427 */ 427 */
428 struct GrSurfaceDesc { 428 struct GrSurfaceDesc {
429 GrSurfaceDesc() 429 GrSurfaceDesc()
430 : fFlags(kNone_GrSurfaceFlags) 430 : fFlags(kNone_GrSurfaceFlags)
431 , fOrigin(kDefault_GrSurfaceOrigin) 431 , fOrigin(kDefault_GrSurfaceOrigin)
432 , fWidth(0) 432 , fWidth(0)
433 , fHeight(0) 433 , fHeight(0)
434 , fConfig(kUnknown_GrPixelConfig) 434 , fConfig(kUnknown_GrPixelConfig)
435 , fSampleCnt(0) { 435 , fSampleCnt(0)
436 , fIsMipMapped(false) {
436 } 437 }
437 438
438 GrSurfaceFlags fFlags; //!< bitfield of TextureFlags 439 GrSurfaceFlags fFlags; //!< bitfield of TextureFlags
439 GrSurfaceOrigin fOrigin; //!< origin of the texture 440 GrSurfaceOrigin fOrigin; //!< origin of the texture
440 int fWidth; //!< Width of the texture 441 int fWidth; //!< Width of the texture
441 int fHeight; //!< Height of the texture 442 int fHeight; //!< Height of the texture
442 443
443 /** 444 /**
444 * Format of source data of the texture. Not guaranteed to be the same as 445 * Format of source data of the texture. Not guaranteed to be the same as
445 * internal format used by 3D API. 446 * internal format used by 3D API.
446 */ 447 */
447 GrPixelConfig fConfig; 448 GrPixelConfig fConfig;
448 449
449 /** 450 /**
450 * The number of samples per pixel or 0 to disable full scene AA. This only 451 * The number of samples per pixel or 0 to disable full scene AA. This only
451 * applies if the kRenderTarget_GrSurfaceFlag is set. The actual number 452 * applies if the kRenderTarget_GrSurfaceFlag is set. The actual number
452 * of samples may not exactly match the request. The request will be rounded 453 * of samples may not exactly match the request. The request will be rounded
453 * up to the next supported sample count, or down if it is larger than the 454 * up to the next supported sample count, or down if it is larger than the
454 * max supported count. 455 * max supported count.
455 */ 456 */
456 int fSampleCnt; 457 int fSampleCnt;
458
459 bool fIsMipMapped; //!< Indicates if the texture has mipma ps
457 }; 460 };
458 461
459 // Legacy alias 462 // Legacy alias
460 typedef GrSurfaceDesc GrTextureDesc; 463 typedef GrSurfaceDesc GrTextureDesc;
461 464
462 /** 465 /**
463 * Clips are composed from these objects. 466 * Clips are composed from these objects.
464 */ 467 */
465 enum GrClipType { 468 enum GrClipType {
466 kRect_ClipType, 469 kRect_ClipType,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 return 4 * width * height; 621 return 4 * width * height;
619 } 622 }
620 } 623 }
621 624
622 /** 625 /**
623 * This value translates to reseting all the context state for any backend. 626 * This value translates to reseting all the context state for any backend.
624 */ 627 */
625 static const uint32_t kAll_GrBackendState = 0xffffffff; 628 static const uint32_t kAll_GrBackendState = 0xffffffff;
626 629
627 #endif 630 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698