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

Unified Diff: src/gpu/GrGpu.h

Issue 2467593002: Move memoization of multisample specs id to GrRenderTarget (Closed)
Patch Set: Move memoization of multisample specs id to GrRenderTarget Created 4 years, 1 month 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 | « no previous file | 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 8e9407a458eb43c3c29ff30d297f4fe5925284a5..48005ec16f4a675b6f7e06b77c4bc13f6566ceff 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -355,10 +355,16 @@ public:
const SkPoint* fSampleLocations;
};
- // Finds a render target's multisample specs. The stencil settings are only needed to flush the
- // draw state prior to querying multisample information; they should not have any effect on the
- // multisample information itself.
- const MultisampleSpecs& getMultisampleSpecs(GrRenderTarget*, const GrStencilSettings&);
+ // Finds a render target's multisample specs. The stencil settings are only needed in case we
+ // need to flush the draw state prior to querying multisample info. They are not expected to
+ // affect the multisample information itself.
+ const MultisampleSpecs& queryMultisampleSpecs(GrRenderTarget*, const GrStencilSettings&);
+
+ // Finds the multisample specs with a given unique id.
+ const MultisampleSpecs& getMultisampleSpecs(uint8_t uniqueID) {
+ SkASSERT(uniqueID > 0 && uniqueID < fMultisampleSpecs.count());
+ return fMultisampleSpecs[uniqueID];
+ }
// Creates a GrGpuCommandBuffer in which the GrOpList can send draw commands to instead of
// directly to the Gpu object.
@@ -581,8 +587,8 @@ private:
const SkIPoint& dstPoint) = 0;
// overridden by backend specific derived class to perform the multisample queries
- virtual void onGetMultisampleSpecs(GrRenderTarget*, const GrStencilSettings&,
- int* effectiveSampleCnt, SamplePattern*) = 0;
+ virtual void onQueryMultisampleSpecs(GrRenderTarget*, const GrStencilSettings&,
+ int* effectiveSampleCnt, SamplePattern*) = 0;
void resetContext() {
this->onResetContext(fResetBits);
« no previous file with comments | « no previous file | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698