aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-05-17 09:57:46 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-17 09:57:46 -0700
commitca6eafc0f7e59ed89f03a9891b9fdf7de64f1f35 (patch)
tree06a052b8018ae4fb6ccbac647d2a4f77cc3a99d1 /include
parentcc49e5950d3a0de03c24da71d23bbdaebead97c6 (diff)
(Mostly) Retract GrRenderTarget from SkGpuDevice
This gets us most of the way to having SkGpuDevice exclusively use a GrDrawContext instead of a GrRenderTarget. There are a few other refactorings (e.g., rm need for fLegacyBitmap and accessRenderTarget) before the GrRenderTarget can be completely removed. Has calved off: https://codereview.chromium.org/1925313002/ (Tighten up SkSpecialSurface factory functions) https://codereview.chromium.org/1925803004/ (Add sk_sp to SkSurface_Gpu and SkGpuDevice) https://codereview.chromium.org/1956473002/ (Retract GrRenderTarget a bit within SkGpuDevice) https://codereview.chromium.org/1979913002/ (Rename GrDrawingMgr::abandon to wasAbandoned & add a matching entry point to GrDrawingContext) https://codereview.chromium.org/1982583002/ (Add isUnifiedMultisampled entry point to GrDrawContext) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1930013002 Review-Url: https://codereview.chromium.org/1930013002
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrContext.h4
-rw-r--r--include/gpu/GrDrawContext.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 46612b110d..86c9fa925f 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -195,7 +195,6 @@ public:
/**
* Create both a GrRenderTarget and a matching GrDrawContext to wrap it.
- * The created GrRenderTarget will always be budgeted.
* We guarantee that "asTexture" will succeed for drawContexts created
* via this entry point.
*/
@@ -204,7 +203,8 @@ public:
GrPixelConfig config,
int sampleCnt = 0,
GrSurfaceOrigin origin = kDefault_GrSurfaceOrigin,
- const SkSurfaceProps* surfaceProps = nullptr);
+ const SkSurfaceProps* surfaceProps = nullptr,
+ SkBudgeted = SkBudgeted::kYes);
///////////////////////////////////////////////////////////////////////////
// Misc.
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
index dd03cf5211..52f8c7ee20 100644
--- a/include/gpu/GrDrawContext.h
+++ b/include/gpu/GrDrawContext.h
@@ -261,9 +261,11 @@ public:
const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); }
int width() const { return fRenderTarget->width(); }
int height() const { return fRenderTarget->height(); }
+ GrPixelConfig config() const { return fRenderTarget->config(); }
bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisampled(); }
int numColorSamples() const { return fRenderTarget->numColorSamples(); }
bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); }
+ const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; }
bool wasAbandoned() const;
@@ -283,8 +285,7 @@ protected:
GrDrawingManager* drawingManager() { return fDrawingManager; }
GrAuditTrail* auditTrail() { return fAuditTrail; }
- const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; }
-
+
SkDEBUGCODE(GrSingleOwner* singleOwner() { return fSingleOwner; })
SkDEBUGCODE(void validate() const;)