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

Unified Diff: src/gpu/gl/GrGLGpu.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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLGpu.h
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index 255952020383a6c432c97916f62986987fe6e1f2..892e95e45d04e5704b84acb7d6ce2eba5f392816 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -20,7 +20,9 @@
#include "GrGLVertexArray.h"
#include "GrGLVertexBuffer.h"
#include "GrGpu.h"
+#include "SkMipMapLevel.h"
#include "GrPipelineBuilder.h"
+#include "SkTArray.h"
#include "GrXferProcessor.h"
#include "SkTypes.h"
@@ -64,7 +66,7 @@ public:
ReadPixelTempDrawInfo*) override;
bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height,
- size_t rowBytes, GrPixelConfig srcConfig, DrawPreference*,
+ GrPixelConfig srcConfig, DrawPreference*,
WritePixelTempDrawInfo*) override;
bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const override;
@@ -143,10 +145,11 @@ private:
void xferBarrier(GrRenderTarget*, GrXferBarrierType) override;
GrTexture* onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::LifeCycle lifeCycle,
- const void* srcData, size_t rowBytes) override;
+ const SkTArray<SkMipMapLevel>& texels) override;
GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc,
GrGpuResource::LifeCycle lifeCycle,
- const void* srcData) override;
+ const SkTArray<SkMipMapLevel>& texels) override;
+
GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override;
GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override;
GrTransferBuffer* onCreateTransferBuffer(size_t size, TransferType type) override;
@@ -173,8 +176,8 @@ private:
bool onWritePixels(GrSurface*,
int left, int top, int width, int height,
- GrPixelConfig config, const void* buffer,
- size_t rowBytes) override;
+ GrPixelConfig config,
+ const SkTArray<SkMipMapLevel>& texels) override;
bool onTransferPixels(GrSurface*,
int left, int top, int width, int height,
@@ -302,8 +305,7 @@ private:
UploadType uploadType,
int left, int top, int width, int height,
GrPixelConfig dataConfig,
- const void* data,
- size_t rowBytes);
+ const SkTArray<SkMipMapLevel>& texels);
// helper for onCreateCompressedTexture. If width and height are
// set to -1, then this function will use desc.fWidth and desc.fHeight
@@ -313,7 +315,7 @@ private:
// with new data.
bool uploadCompressedTexData(const GrSurfaceDesc& desc,
GrGLenum target,
- const void* data,
+ const SkTArray<SkMipMapLevel>& texels,
UploadType uploadType = kNewTexture_UploadType,
int left = 0, int top = 0,
int width = -1, int height = -1);
« src/gpu/SkGr.cpp ('K') | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698