aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-12-04 12:52:46 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-04 18:37:29 +0000
commit7ffbcf909d365eb22c5e22b776aeac7b7472fbf3 (patch)
treea71ca068a01ca87ea417f341adf4dee40c811d58 /include/private
parentbee6cacc54357e0af1de67d527fe51eb3602c2d6 (diff)
Add unit test for SkDeferredDisplayLists (take 2)
Change-Id: I76a4c77d5b9418cb7fe677bd55ba32a2e336924d Reviewed-on: https://skia-review.googlesource.com/79820 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/private')
-rw-r--r--include/private/SkDeferredDisplayList.h2
-rw-r--r--include/private/SkSurfaceCharacterization.h18
2 files changed, 13 insertions, 7 deletions
diff --git a/include/private/SkDeferredDisplayList.h b/include/private/SkDeferredDisplayList.h
index c6e67f4dcc..b53390d174 100644
--- a/include/private/SkDeferredDisplayList.h
+++ b/include/private/SkDeferredDisplayList.h
@@ -32,7 +32,7 @@ public:
}
// TODO: remove this. It is just scaffolding to get something up & running
- void draw(SkSurface*);
+ bool draw(SkSurface*);
private:
const SkSurfaceCharacterization fCharacterization;
diff --git a/include/private/SkSurfaceCharacterization.h b/include/private/SkSurfaceCharacterization.h
index 8b20cacb36..f450b704d9 100644
--- a/include/private/SkSurfaceCharacterization.h
+++ b/include/private/SkSurfaceCharacterization.h
@@ -11,6 +11,7 @@
#include "GrTypes.h"
#if SK_SUPPORT_GPU
+#include "GrTypesPriv.h"
#include "SkSurfaceProps.h"
class GrContextThreadSafeProxy;
@@ -21,7 +22,7 @@ class SkColorSpace;
rendering decisions. When passed into a SkDeferredDisplayListRecorder it will copy the
data and pass it on to the SkDeferredDisplayList if/when it is created. Note that both of
those objects (the Recorder and the DisplayList) will take a ref on the
- GrContextThreadSafeProxy object.
+ GrContextThreadSafeProxy and SkColorSpace objects.
*/
class SkSurfaceCharacterization {
public:
@@ -30,7 +31,8 @@ public:
, fWidth(0)
, fHeight(0)
, fConfig(kUnknown_GrPixelConfig)
- , fSampleCnt(0)
+ , fFSAAType(GrFSAAType::kNone)
+ , fStencilCnt(0)
, fSurfaceProps(0, kUnknown_SkPixelGeometry) {
}
@@ -45,7 +47,8 @@ public:
int width() const { return fWidth; }
int height() const { return fHeight; }
GrPixelConfig config() const { return fConfig; }
- int sampleCount() const { return fSampleCnt; }
+ GrFSAAType fsaaType() const { return fFSAAType; }
+ int stencilCount() const { return fStencilCnt; }
SkColorSpace* colorSpace() const { return fColorSpace.get(); }
sk_sp<SkColorSpace> refColorSpace() const { return fColorSpace; }
const SkSurfaceProps& surfaceProps()const { return fSurfaceProps; }
@@ -57,7 +60,8 @@ private:
GrSurfaceOrigin origin,
int width, int height,
GrPixelConfig config,
- int sampleCnt,
+ GrFSAAType fsaaType,
+ int stencilCnt,
sk_sp<SkColorSpace> colorSpace,
const SkSurfaceProps& surfaceProps) {
fContextInfo = contextInfo;
@@ -65,7 +69,8 @@ private:
fWidth = width;
fHeight = height;
fConfig = config;
- fSampleCnt = sampleCnt;
+ fFSAAType = fsaaType;
+ fStencilCnt = stencilCnt;
fColorSpace = std::move(colorSpace);
fSurfaceProps = surfaceProps;
}
@@ -75,7 +80,8 @@ private:
int fWidth;
int fHeight;
GrPixelConfig fConfig;
- int fSampleCnt;
+ GrFSAAType fFSAAType;
+ int fStencilCnt;
sk_sp<SkColorSpace> fColorSpace;
SkSurfaceProps fSurfaceProps;
};