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 1534123003: More framework support for TransferBuffers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 12 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 8c127f641908b856fb07004286f2f1951aee2c7b..5aa17b97129edc4a486d6eda2d9ce12f401d90e9 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -172,6 +172,11 @@ private:
GrPixelConfig config, const void* buffer,
size_t rowBytes) override;
+ bool onTransferPixels(GrSurface*,
+ int left, int top, int width, int height,
+ GrPixelConfig config, GrTransferBuffer* buffer,
+ size_t offset, size_t rowBytes) override;
+
void onResolveRenderTarget(GrRenderTarget* target) override;
void onDraw(const DrawArgs&, const GrNonInstancedVertices&) override;
@@ -284,9 +289,14 @@ private:
void flushHWAAState(GrRenderTarget* rt, bool useHWAA);
// helper for onCreateTexture and writeTexturePixels
+ enum UploadType {
+ kDefault_UploadType,
bsalomon 2016/01/05 14:01:17 Maybe brief comments here about what these are (pa
jvanverth1 2016/01/05 17:21:28 Done.
+ kNewTexture_UploadType,
+ kTransfer_UploadType
+ };
bool uploadTexData(const GrSurfaceDesc& desc,
GrGLenum target,
- bool isNewTexture,
+ UploadType uploadType,
int left, int top, int width, int height,
GrPixelConfig dataConfig,
const void* data,
@@ -301,7 +311,7 @@ private:
bool uploadCompressedTexData(const GrSurfaceDesc& desc,
GrGLenum target,
const void* data,
- bool isNewTexture = true,
+ 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