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

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: Refactoring the mipmap level count out. Cleaning includes. 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 b2eec45835879737ea147201b7b642f7ed136117..0e592abb91b48eda5f3edbfa86da43a2d78c39ff 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;
@@ -170,8 +173,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,
@@ -299,8 +302,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
@@ -310,7 +312,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);

Powered by Google App Engine
This is Rietveld 408576698