aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-01-11 10:32:34 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-11 16:01:07 +0000
commitbc6b99d22e8d9f6543ffffdc846e40e8075046c5 (patch)
tree26867cf018bf9ef55028efe2e0ffc6fc176a06eb /include/gpu
parenta5494f117086d712855e4b6289c58c92d1549bcf (diff)
Add test for processor->resource ref/io counts
Change-Id: I63a8cb9f1564bfc15ef98121b77946a647c79f32 Reviewed-on: https://skia-review.googlesource.com/6814 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrGpuResource.h2
-rw-r--r--include/gpu/GrProcessor.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index 29d33df4bd..32376e524b 100644
--- a/include/gpu/GrGpuResource.h
+++ b/include/gpu/GrGpuResource.h
@@ -75,6 +75,8 @@ public:
#endif
}
+ void testingOnly_getCounts(int* refCnt, int* readCnt, int* writeCnt) const;
+
protected:
GrIORef() : fRefCnt(1), fPendingReads(0), fPendingWrites(0) { }
diff --git a/include/gpu/GrProcessor.h b/include/gpu/GrProcessor.h
index f0f895f3c2..32995c308b 100644
--- a/include/gpu/GrProcessor.h
+++ b/include/gpu/GrProcessor.h
@@ -252,6 +252,11 @@ private:
*/
class GrProcessor::BufferAccess : public SkNoncopyable {
public:
+ BufferAccess() = default;
+ BufferAccess(GrPixelConfig texelConfig, GrBuffer* buffer,
+ GrShaderFlags visibility = kFragment_GrShaderFlag) {
+ this->reset(texelConfig, buffer, visibility);
+ }
/**
* Must be initialized before adding to a GrProcessor's buffer access list.
*/