OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef GrGpu_DEFINED | 10 #ifndef GrGpu_DEFINED |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 void unimpl(const char[]); | 71 void unimpl(const char[]); |
72 | 72 |
73 /** | 73 /** |
74 * Creates a texture object. If desc width or height is not a power of | 74 * Creates a texture object. If desc width or height is not a power of |
75 * two but underlying API requires a power of two texture then srcData | 75 * two but underlying API requires a power of two texture then srcData |
76 * will be embedded in a power of two texture. The extra width and height | 76 * will be embedded in a power of two texture. The extra width and height |
77 * is filled as though srcData were rendered clamped into the texture. | 77 * is filled as though srcData were rendered clamped into the texture. |
78 * | 78 * |
79 * If kRenderTarget_TextureFlag is specified the GrRenderTarget is | 79 * If kRenderTarget_TextureFlag is specified the GrRenderTarget is |
80 * accessible via GrTexture::asRenderTarget(). The texture will hold a ref | 80 * accessible via GrTexture::asRenderTarget(). The texture will hold a ref |
81 * on the render target until its releaseRenderTarget() is called or it is | 81 * on the render target until the texture is destroyed. |
82 * destroyed. | |
83 * | 82 * |
84 * @param desc describes the texture to be created. | 83 * @param desc describes the texture to be created. |
85 * @param srcData texel data to load texture. Begins with full-size | 84 * @param srcData texel data to load texture. Begins with full-size |
86 * palette data for paletted textures. Contains width* | 85 * palette data for paletted textures. Contains width* |
87 * height texels. If NULL texture data is uninitialized. | 86 * height texels. If NULL texture data is uninitialized. |
88 * | 87 * |
89 * @return The texture object if successful, otherwise NULL. | 88 * @return The texture object if successful, otherwise NULL. |
90 */ | 89 */ |
91 GrTexture* createTexture(const GrTextureDesc& desc, | 90 GrTexture* createTexture(const GrTextureDesc& desc, |
92 const void* srcData, size_t rowBytes); | 91 const void* srcData, size_t rowBytes); |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 // these are mutable so they can be created on-demand | 530 // these are mutable so they can be created on-demand |
532 mutable GrVertexBuffer* fUnitSqu
areVertexBuffer; | 531 mutable GrVertexBuffer* fUnitSqu
areVertexBuffer; |
533 mutable GrIndexBuffer* fQuadInd
exBuffer; | 532 mutable GrIndexBuffer* fQuadInd
exBuffer; |
534 bool fContext
IsDirty; | 533 bool fContext
IsDirty; |
535 ResourceList fResourc
eList; | 534 ResourceList fResourc
eList; |
536 | 535 |
537 typedef GrDrawTarget INHERITED; | 536 typedef GrDrawTarget INHERITED; |
538 }; | 537 }; |
539 | 538 |
540 #endif | 539 #endif |
OLD | NEW |