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

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: Removing the concept of a dirty mipmap. It is expected that the texture upload provides the mipmaps. 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 833f1ff7ec0356adeae9e6ffe1e7f9fd8a7b5f59..5a6e9136250b8f023a20f7dc294707149459c7a8 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;
@@ -273,8 +276,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
@@ -283,7 +285,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