| OLD | NEW |
| 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 GrGLGpu_DEFINED | 8 #ifndef GrGLGpu_DEFINED |
| 9 #define GrGLGpu_DEFINED | 9 #define GrGLGpu_DEFINED |
| 10 | 10 |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 void flushStencil(const GrStencilSettings&); | 305 void flushStencil(const GrStencilSettings&); |
| 306 void flushHWAAState(GrRenderTarget* rt, bool useHWAA); | 306 void flushHWAAState(GrRenderTarget* rt, bool useHWAA); |
| 307 | 307 |
| 308 // helper for onCreateTexture and writeTexturePixels | 308 // helper for onCreateTexture and writeTexturePixels |
| 309 enum UploadType { | 309 enum UploadType { |
| 310 kNewTexture_UploadType, // we are creating a new texture | 310 kNewTexture_UploadType, // we are creating a new texture |
| 311 kWrite_UploadType, // we are using TexSubImage2D to copy data to
an existing texture | 311 kWrite_UploadType, // we are using TexSubImage2D to copy data to
an existing texture |
| 312 kTransfer_UploadType, // we are using a transfer buffer to copy dat
a | 312 kTransfer_UploadType, // we are using a transfer buffer to copy dat
a |
| 313 }; | 313 }; |
| 314 bool uploadTexData(const GrSurfaceDesc& desc, | 314 bool uploadTexData(const GrSurfaceDesc& desc, |
| 315 GrGLenum target, | 315 GrGLTextureInfo* info, |
| 316 UploadType uploadType, | 316 UploadType uploadType, |
| 317 int left, int top, int width, int height, | 317 int left, int top, int width, int height, |
| 318 GrPixelConfig dataConfig, | 318 GrPixelConfig dataConfig, |
| 319 const void* data, | 319 const void* data, |
| 320 size_t rowBytes); | 320 size_t rowBytes); |
| 321 | 321 |
| 322 // helper for onCreateCompressedTexture. If width and height are | 322 // helper for onCreateCompressedTexture. If width and height are |
| 323 // set to -1, then this function will use desc.fWidth and desc.fHeight | 323 // set to -1, then this function will use desc.fWidth and desc.fHeight |
| 324 // for the size of the data. The isNewTexture flag should be set to true | 324 // for the size of the data. The isNewTexture flag should be set to true |
| 325 // whenever a new texture needs to be created. Otherwise, we assume that | 325 // whenever a new texture needs to be created. Otherwise, we assume that |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 SkFAIL("Unexpected texture target type."); | 563 SkFAIL("Unexpected texture target type."); |
| 564 return 0; | 564 return 0; |
| 565 } | 565 } |
| 566 } | 566 } |
| 567 | 567 |
| 568 typedef GrGpu INHERITED; | 568 typedef GrGpu INHERITED; |
| 569 friend class GrGLPathRendering; // For accessing setTextureUnit. | 569 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 570 }; | 570 }; |
| 571 | 571 |
| 572 #endif | 572 #endif |
| OLD | NEW |