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

Unified Diff: src/gpu/GrClipMaskManager.h

Issue 2138083002: skip call to clip::apply when clip is wide open Base URL: https://chromium.googlesource.com/skia.git@llist
Patch Set: rm gcmm Created 4 years, 5 months 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 | « src/gpu/GrClip.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.h
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
deleted file mode 100644
index dc24d9f5b353f422de0a76e91cb2e1c78e625c33..0000000000000000000000000000000000000000
--- a/src/gpu/GrClipMaskManager.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#ifndef GrClipMaskManager_DEFINED
-#define GrClipMaskManager_DEFINED
-
-#include "GrReducedClip.h"
-#include "SkClipStack.h"
-#include "SkTypes.h"
-
-class GrAppliedClip;
-class GrClipStackClip;
-class GrContext;
-class GrDrawContext;
-class GrFixedClip;
-class GrPathRenderer;
-class GrPathRendererChain;
-class GrPipelineBuilder;
-class GrResourceProvider;
-class GrTexture;
-class GrTextureProvider;
-class GrUniqueKey;
-struct GrUserStencilSettings;
-
-
-/**
- * The clip mask creator handles the generation of the clip mask. If anti
- * aliasing is requested it will (in the future) generate a single channel
- * (8bit) mask. If no anti aliasing is requested it will generate a 1-bit
- * mask in the stencil buffer. In the non anti-aliasing case, if the clip
- * mask can be represented as a rectangle then scissoring is used. In all
- * cases scissoring is used to bound the range of the clip mask.
- */
-// This has to remain a class, for now, so it can be friended (by GrDrawContext & GrContext)
-class GrClipMaskManager {
-public:
- /**
- * Creates a clip mask if necessary as a stencil buffer or alpha texture
- * and sets the GrGpu's scissor and stencil state. If the return is false
- * then the draw can be skipped. devBounds is optional but can help optimize
- * clipping.
- */
- static bool SetupClipping(GrContext*, const GrPipelineBuilder&, GrDrawContext*,
- const GrClipStackClip&, const SkRect* devBounds, GrAppliedClip*);
-
-private:
- static bool PathNeedsSWRenderer(GrContext* context,
- bool hasUserStencilSettings,
- const GrDrawContext*,
- const SkMatrix& viewMatrix,
- const SkClipStack::Element* element,
- GrPathRenderer** prOut,
- bool needsStencil);
-
- // Draws the clip into the stencil buffer
- static bool CreateStencilClipMask(GrContext*,
- GrDrawContext*,
- int32_t elementsGenID,
- GrReducedClip::InitialState initialState,
- const GrReducedClip::ElementList& elements,
- const SkIRect& clipSpaceIBounds,
- const SkIPoint& clipSpaceToStencilOffset);
-
- // Creates an alpha mask of the clip. The mask is a rasterization of elements through the
- // rect specified by clipSpaceIBounds.
- static sk_sp<GrTexture> CreateAlphaClipMask(GrContext*,
- int32_t elementsGenID,
- GrReducedClip::InitialState initialState,
- const GrReducedClip::ElementList& elements,
- const SkVector& clipToMaskOffset,
- const SkIRect& clipSpaceIBounds);
-
- // Similar to createAlphaClipMask but it rasterizes in SW and uploads to the result texture.
- static sk_sp<GrTexture> CreateSoftwareClipMask(GrTextureProvider*,
- int32_t elementsGenID,
- GrReducedClip::InitialState initialState,
- const GrReducedClip::ElementList& elements,
- const SkVector& clipToMaskOffset,
- const SkIRect& clipSpaceIBounds);
-
- static bool UseSWOnlyPath(GrContext*,
- const GrPipelineBuilder&,
- const GrDrawContext*,
- const SkVector& clipToMaskOffset,
- const GrReducedClip::ElementList& elements);
-
- static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey& key,
- bool renderTarget);
-};
-
-#endif // GrClipMaskManager_DEFINED
« no previous file with comments | « src/gpu/GrClip.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698