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

Unified Diff: src/gpu/GrGpu.h

Issue 1888473002: Use transfer buffer for BatchAtlas texture copies Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase to ToT Created 4 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
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.h
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 3e3a4cd676b0388ef72b41def0fc3f7d6f5e0256..4697b7b824ae7fa3ac4e33493674beacc06fe7e0 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -289,9 +289,9 @@ public:
size_t rowBytes);
/**
- * Updates the pixels in a rectangle of a surface using a buffer
+ * Updates the pixels in a rectangle of a texture using a buffer
*
- * @param surface The surface to write to.
+ * @param textre The texture to write to.
* @param left left edge of the rectangle to write (inclusive)
* @param top top edge of the rectangle to write (inclusive)
* @param width width of rectangle to write in pixels.
@@ -302,10 +302,10 @@ public:
* @param rowBytes number of bytes between consecutive rows. Zero
* means rows are tightly packed.
*/
- bool transferPixels(GrSurface* surface,
+ bool transferPixels(GrTexture* texture,
int left, int top, int width, int height,
GrPixelConfig config, GrBuffer* transferBuffer,
- size_t offset, size_t rowBytes);
+ size_t offset, size_t rowBytes, GrFence* fence);
/**
* This is can be called before allocating a texture to be a dst for copySurface. This is only
@@ -371,6 +371,10 @@ public:
// Provides a hook for post-flush actions (e.g. PLS reset and Vulkan command buffer submits).
virtual void finishDrawTarget() {}
+ virtual GrFence SK_WARN_UNUSED_RESULT insertFence() const = 0;
+ virtual bool waitFence(GrFence) const = 0;
+ virtual void deleteFence(GrFence) const = 0;
+
///////////////////////////////////////////////////////////////////////////
// Debugging and Stats
@@ -561,8 +565,8 @@ private:
GrPixelConfig config,
const SkTArray<GrMipLevel>& texels) = 0;
- // overridden by backend-specific derived class to perform the surface write
- virtual bool onTransferPixels(GrSurface*,
+ // overridden by backend-specific derived class to perform the texture transfer
+ virtual bool onTransferPixels(GrTexture*,
int left, int top, int width, int height,
GrPixelConfig config, GrBuffer* transferBuffer,
size_t offset, size_t rowBytes) = 0;
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698