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

Side by Side Diff: src/gpu/GrDrawContextPriv.h

Issue 1754563003: Begin weaning GrClipMaskManager off of GrDrawTarget (take 2) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix fAuditTrail uses Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrDrawContextPriv_DEFINED
9 #define GrDrawContextPriv_DEFINED
10
11 #include "GrDrawContext.h"
12
13 class GrStencilSettings;
14
15 /** Class that adds methods to GrDrawContext that are only intended for use inte rnal to Skia.
16 This class is purely a privileged window into GrDrawContext. It should never have additional
17 data members or virtual methods. */
18 class GrDrawContextPriv {
19 public:
20 bool drawAndStencilRect(const SkIRect* scissorRect,
21 const GrStencilSettings&,
22 SkRegion::Op op,
23 bool invert,
24 bool doAA,
25 const SkMatrix& viewMatrix,
26 const SkRect&);
27
28 bool drawAndStencilPath(const SkIRect* scissorRect,
29 const GrStencilSettings&,
30 SkRegion::Op op,
31 bool invert,
32 bool doAA,
33 const SkMatrix& viewMatrix,
34 const SkPath&);
35
36 void testingOnly_drawBatch(const GrPipelineBuilder& pipelineBuilder,
37 GrDrawBatch* batch);
38
39 private:
40 explicit GrDrawContextPriv(GrDrawContext* drawContext) : fDrawContext(drawCo ntext) {}
41 GrDrawContextPriv(const GrRenderTargetPriv&) {} // unimpl
42 GrDrawContextPriv& operator=(const GrRenderTargetPriv&); // unimpl
43
44 // No taking addresses of this type.
45 const GrDrawContextPriv* operator&() const;
46 GrDrawContextPriv* operator&();
47
48 GrDrawContext* fDrawContext;
49
50 friend class GrDrawContext; // to construct/copy this type.
51 };
52
53 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext Priv(this); }
54
55 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const {
56 return GrDrawContextPriv(const_cast<GrDrawContext*>(this));
57 }
58
59 #endif
60
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698