Lines Matching defs:GrContext

10 #include "GrContext.h"
49 "Defers rendering in GrContext via GrInOrderDrawBuffer.");
71 // Glorified typedef to avoid including GrDrawState.h in GrContext.h
72 class GrContext::AutoRestoreEffects : public GrDrawState::AutoRestoreEffects {};
74 class GrContext::AutoCheckFlush {
76 AutoCheckFlush(GrContext* context) : fContext(context) { SkASSERT(context); }
85 GrContext* fContext;
88 GrContext* GrContext::Create(GrBackend backend, GrBackendContext backendContext,
90 GrContext* context;
92 context = SkNEW_ARGS(GrContext, (Options()));
94 context = SkNEW_ARGS(GrContext, (*opts));
105 GrContext::GrContext(const Options& opts) : fOptions(opts) {
124 bool GrContext::init(GrBackend backend, GrBackendContext backendContext) {
156 GrContext::~GrContext() {
185 void GrContext::abandonContext() {
215 void GrContext::resetContext(uint32_t state) {
219 void GrContext::freeGpuResources() {
238 void GrContext::getResourceCacheUsage(int* resourceCount, size_t* resourceBytes) const {
247 GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget,
262 GrTexture* GrContext::findAndRefTexture(const GrTextureDesc& desc,
271 bool GrContext::isTextureInCache(const GrTextureDesc& desc,
278 void GrContext::addStencilBuffer(GrStencilBuffer* sb) {
287 GrStencilBuffer* GrContext::findStencilBuffer(int width, int height,
333 GrTexture* GrContext::createResizedTexture(const GrTextureDesc& desc,
407 GrTexture* GrContext::createTexture(const GrTextureParams* params,
456 GrTexture* GrContext::lockAndRefScratchTexture(const GrTextureDesc& inDesc, ScratchTexMatch match) {
519 void GrContext::addExistingTextureToCache(GrTexture* texture) {
548 void GrContext::unlockScratchTexture(GrTexture* texture) {
588 void GrContext::purgeCache() {
594 bool GrContext::OverbudgetCB(void* data) {
597 GrContext* context = reinterpret_cast<GrContext*>(data);
606 GrTexture* GrContext::createUncachedTexture(const GrTextureDesc& descIn,
613 void GrContext::getResourceCacheLimits(int* maxTextures, size_t* maxTextureBytes) const {
617 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) {
621 int GrContext::getMaxTextureSize() const {
625 int GrContext::getMaxRenderTargetSize() const {
629 int GrContext::getMaxSampleCount() const {
635 GrTexture* GrContext::wrapBackendTexture(const GrBackendTextureDesc& desc) {
639 GrRenderTarget* GrContext::wrapBackendRenderTarget(const GrBackendRenderTargetDesc& desc) {
645 bool GrContext::supportsIndex8PixelConfig(const GrTextureParams* params,
666 void GrContext::clear(const SkIRect* rect,
673 GR_CREATE_TRACE_MARKER_CONTEXT("GrContext::clear", this);
681 void GrContext::drawPaint(const GrPaint& origPaint) {
691 GR_CREATE_TRACE_MARKER_CONTEXT("GrContext::drawPaint", this);
716 void GrContext::dumpFontCache() const {
795 void GrContext::drawRect(const GrPaint& paint,
812 GR_CREATE_TRACE_MARKER("GrContext::drawRect", target);
915 void GrContext::drawRectToRect(const GrPaint& paint,
926 GR_CREATE_TRACE_MARKER("GrContext::drawRectToRect", target);
975 void GrContext::drawVertices(const GrPaint& paint,
993 GR_CREATE_TRACE_MARKER("GrContext::drawVertices", target);
1035 void GrContext::drawRRect(const GrPaint& paint,
1056 GR_CREATE_TRACE_MARKER("GrContext::drawRRect", target);
1069 void GrContext::drawDRRect(const GrPaint& paint,
1080 GR_CREATE_TRACE_MARKER("GrContext::drawDRRect", target);
1095 void GrContext::drawOval(const GrPaint& paint,
1116 GR_CREATE_TRACE_MARKER("GrContext::drawOval", target);
1178 void GrContext::drawPath(const GrPaint& paint, const SkPath& path, const GrStrokeInfo& strokeInfo) {
1235 GR_CREATE_TRACE_MARKER1("GrContext::drawPath", target, "Is Convex", path.isConvex());
1266 void GrContext::internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path,
1270 GR_CREATE_TRACE_MARKER("GrContext::internalDrawPath", target);
1321 void GrContext::flush(int flagsBitfield) {
1334 bool GrContext::writeTexturePixels(GrTexture* texture,
1358 bool GrContext::readTexturePixels(GrTexture* texture,
1408 bool GrContext::readRenderTargetPixels(GrRenderTarget* target,
1549 void GrContext::resolveRenderTarget(GrRenderTarget* target) {
1561 void GrContext::discardRenderTarget(GrRenderTarget* renderTarget) {
1573 void GrContext::copyTexture(GrTexture* src, GrRenderTarget* dst, const SkIPoint* topLeft) {
1597 bool GrContext::writeRenderTargetPixels(GrRenderTarget* target,
1732 GrDrawTarget* GrContext::prepareToDraw(const GrPaint* paint,
1790 GrPathRenderer* GrContext::getPathRenderer(const SkPath& path,
1818 bool GrContext::isConfigRenderable(GrPixelConfig config, bool withMSAA) const {
1822 int GrContext::getRecommendedSampleCount(GrPixelConfig config,
1839 void GrContext::setupDrawBuffer() {
1860 GrDrawTarget* GrContext::getTextTarget() {
1864 const GrIndexBuffer* GrContext::getQuadIndexBuffer() const {
1869 void test_pm_conversions(GrContext* ctx, int* pmToUPMValue, int* upmToPMValue) {
1878 const GrFragmentProcessor* GrContext::createPMToUPMEffect(GrTexture* texture,
1894 const GrFragmentProcessor* GrContext::createUPMToPMEffect(GrTexture* texture,
1910 void GrContext::addResourceToCache(const GrResourceKey& resourceKey, GrGpuResource* resource) {
1915 GrGpuResource* GrContext::findAndRefCachedResource(const GrResourceKey& resourceKey) {
1921 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) {
1928 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) {
1937 void GrContext::printCacheStats() const {
1943 const GrContext::GPUStats* GrContext::gpuStats() const {