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

Side by Side Diff: src/gpu/gl/GrGLGpu.h

Issue 1623653002: skia: Add support for CHROMIUM_image backed textures. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Add test. 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 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
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
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
OLDNEW
« include/gpu/GrTypes.h ('K') | « src/gpu/SkGrPixelRef.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698