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

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

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrRenderTargetContext.cpp ('k') | src/gpu/GrRenderTargetOpList.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrRenderTargetContextPriv_DEFINED 8 #ifndef GrRenderTargetContextPriv_DEFINED
9 #define GrRenderTargetContextPriv_DEFINED 9 #define GrRenderTargetContextPriv_DEFINED
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 const SkMatrix& viewMatrix, 78 const SkMatrix& viewMatrix,
79 const SkPath&); 79 const SkPath&);
80 80
81 SkBudgeted isBudgeted() const; 81 SkBudgeted isBudgeted() const;
82 82
83 void testingOnly_drawBatch(const GrPaint&, 83 void testingOnly_drawBatch(const GrPaint&,
84 GrDrawBatch* batch, 84 GrDrawBatch* batch,
85 const GrUserStencilSettings* = nullptr, 85 const GrUserStencilSettings* = nullptr,
86 bool snapToCenters = false); 86 bool snapToCenters = false);
87 87
88 GrContext* context() { return fRenderTargetContext->fContext; }
89
90 GrRenderTargetProxy* accessRTP() { return fRenderTargetContext->fRenderTarge tProxy.get(); }
91
88 private: 92 private:
89 explicit GrRenderTargetContextPriv(GrRenderTargetContext* renderTargetContex t) 93 explicit GrRenderTargetContextPriv(GrRenderTargetContext* renderTargetContex t)
90 : fRenderTargetContext(renderTargetContext) {} 94 : fRenderTargetContext(renderTargetContext) {}
91 GrRenderTargetContextPriv(const GrRenderTargetPriv&) {} // unimpl 95 GrRenderTargetContextPriv(const GrRenderTargetPriv&) {} // unimpl
92 GrRenderTargetContextPriv& operator=(const GrRenderTargetPriv&); // unimpl 96 GrRenderTargetContextPriv& operator=(const GrRenderTargetPriv&); // unimpl
93 97
94 // No taking addresses of this type. 98 // No taking addresses of this type.
95 const GrRenderTargetContextPriv* operator&() const; 99 const GrRenderTargetContextPriv* operator&() const;
96 GrRenderTargetContextPriv* operator&(); 100 GrRenderTargetContextPriv* operator&();
97 101
98 GrRenderTargetContext* fRenderTargetContext; 102 GrRenderTargetContext* fRenderTargetContext;
99 103
100 friend class GrRenderTargetContext; // to construct/copy this type. 104 friend class GrRenderTargetContext; // to construct/copy this type.
101 }; 105 };
102 106
103 inline GrRenderTargetContextPriv GrRenderTargetContext::priv() { 107 inline GrRenderTargetContextPriv GrRenderTargetContext::priv() {
104 return GrRenderTargetContextPriv(this); 108 return GrRenderTargetContextPriv(this);
105 } 109 }
106 110
107 inline const GrRenderTargetContextPriv GrRenderTargetContext::priv() const { 111 inline const GrRenderTargetContextPriv GrRenderTargetContext::priv() const {
108 return GrRenderTargetContextPriv(const_cast<GrRenderTargetContext*>(this)); 112 return GrRenderTargetContextPriv(const_cast<GrRenderTargetContext*>(this));
109 } 113 }
110 114
111 #endif 115 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrRenderTargetContext.cpp ('k') | src/gpu/GrRenderTargetOpList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698