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

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: Fixing incorrect rebase. Created 5 years, 3 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 2387b44af61ff4d5915f75fe414d1f12b4e11cd7..67c661ffa18ae70fa4b738a2677630370de7ad48 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -19,7 +19,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"
@@ -62,7 +64,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;
@@ -123,10 +125,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;
GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership) override;
@@ -149,8 +152,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;
void onResolveRenderTarget(GrRenderTarget* target) override;
@@ -272,8 +275,7 @@ private:
bool isNewTexture,
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
@@ -282,7 +284,7 @@ private:
// the texture is already in GPU memory and that it's going to be updated
// with new data.
bool uploadCompressedTexData(const GrSurfaceDesc& desc,
- const void* data,
+ const SkTArray<SkMipMapLevel>& texels,
bool isNewTexture = true,
int left = 0, int top = 0,
int width = -1, int height = -1);

Powered by Google App Engine
This is Rietveld 408576698