| Index: src/gpu/GrGpu.h
|
| diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
|
| index e77f29346fc312224a5aef544886c33b7cf532ac..032edc3fc97f75e1ebe1eedb26267e43ff318dff 100644
|
| --- a/src/gpu/GrGpu.h
|
| +++ b/src/gpu/GrGpu.h
|
| @@ -17,7 +17,6 @@
|
| #include "GrXferProcessor.h"
|
| #include "SkPath.h"
|
| #include "SkTArray.h"
|
| -#include <map>
|
|
|
| class GrBatchTracker;
|
| class GrBuffer;
|
| @@ -342,19 +341,14 @@
|
| const SkIPoint& dstPoint);
|
|
|
| struct MultisampleSpecs {
|
| - MultisampleSpecs(uint8_t uniqueID, int effectiveSampleCnt, const SkPoint* locations)
|
| - : fUniqueID(uniqueID),
|
| - fEffectiveSampleCnt(effectiveSampleCnt),
|
| - fSampleLocations(locations) {}
|
| -
|
| // Nonzero ID that uniquely identifies these multisample specs.
|
| - uint8_t fUniqueID;
|
| + uint8_t fUniqueID;
|
| // The actual number of samples the GPU will run. NOTE: this value can be greater than the
|
| // the render target's sample count.
|
| - int fEffectiveSampleCnt;
|
| - // If sample locations are supported, points to the subpixel locations at which the GPU will
|
| - // sample. Pixel center is at (.5, .5), and (0, 0) indicates the top left corner.
|
| - const SkPoint* fSampleLocations;
|
| + int fEffectiveSampleCnt;
|
| + // If sample locations are supported, contains the subpixel locations at which the GPU will
|
| + // sample. Pixel center is at (.5, .5) and (0, 0) indicates the top left corner.
|
| + SkAutoTDeleteArray<const SkPoint> fSampleLocations;
|
| };
|
|
|
| // Finds a render target's multisample specs. The stencil settings are only needed to flush the
|
| @@ -510,8 +504,6 @@
|
| // Subclass must initialize this in its constructor.
|
| SkAutoTUnref<const GrCaps> fCaps;
|
|
|
| - typedef SkTArray<SkPoint, true> SamplePattern;
|
| -
|
| private:
|
| // called when the 3D context state is unknown. Subclass should emit any
|
| // assumed 3D context state and dirty any state cache.
|
| @@ -577,8 +569,10 @@
|
| 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 onGetMultisampleSpecs(GrRenderTarget*,
|
| + const GrStencilSettings&,
|
| + int* effectiveSampleCnt,
|
| + SkAutoTDeleteArray<SkPoint>* sampleLocations) = 0;
|
|
|
| void resetContext() {
|
| this->onResetContext(fResetBits);
|
| @@ -586,16 +580,12 @@
|
| ++fResetTimestamp;
|
| }
|
|
|
| - struct SamplePatternComparator {
|
| - bool operator()(const SamplePattern&, const SamplePattern&) const;
|
| - };
|
| -
|
| - ResetTimestamp fResetTimestamp;
|
| - uint32_t fResetBits;
|
| - std::map<SamplePattern, uint8_t, SamplePatternComparator> fMultisampleSpecsIdMap;
|
| - SkSTArray<1, MultisampleSpecs, true> fMultisampleSpecs;
|
| + ResetTimestamp fResetTimestamp;
|
| + uint32_t fResetBits;
|
| + SkTArray<const MultisampleSpecs*, true> fMultisampleSpecsMap;
|
| + GrTAllocator<MultisampleSpecs> fMultisampleSpecsAllocator;
|
| // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
|
| - GrContext* fContext;
|
| + GrContext* fContext;
|
|
|
| friend class GrPathRendering;
|
| friend class gr_instanced::InstancedRendering;
|
|
|