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

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

Issue 1151283004: Split drawing functionality out of GrContext and into new GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-GPU builds Created 5 years, 7 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.cpp » ('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 2010 Google Inc. 2 * Copyright 2010 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 GrDrawTarget_DEFINED 8 #ifndef GrDrawTarget_DEFINED
9 #define GrDrawTarget_DEFINED 9 #define GrDrawTarget_DEFINED
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 * Helper function for drawing rects. 111 * Helper function for drawing rects.
112 * 112 *
113 * @param rect the rect to draw 113 * @param rect the rect to draw
114 * @param localRect optional rect that specifies local coords to map onto 114 * @param localRect optional rect that specifies local coords to map onto
115 * rect. If NULL then rect serves as the local coords. 115 * rect. If NULL then rect serves as the local coords.
116 * @param localMatrix Optional local matrix. The local coordinates are speci fied by localRect, 116 * @param localMatrix Optional local matrix. The local coordinates are speci fied by localRect,
117 * or if it is NULL by rect. This matrix applies to the c oordinate implied by 117 * or if it is NULL by rect. This matrix applies to the c oordinate implied by
118 * that rectangle before it is input to GrCoordTransforms that read local 118 * that rectangle before it is input to GrCoordTransforms that read local
119 * coordinates 119 * coordinates
120 */ 120 */
121 void drawRect(GrPipelineBuilder* pipelineBuilder, 121 void drawBWRect(GrPipelineBuilder* pipelineBuilder,
122 GrColor color, 122 GrColor color,
123 const SkMatrix& viewMatrix, 123 const SkMatrix& viewMatrix,
124 const SkRect& rect, 124 const SkRect& rect,
125 const SkRect* localRect, 125 const SkRect* localRect,
126 const SkMatrix* localMatrix); 126 const SkMatrix* localMatrix);
127 127
128 /** 128 /**
129 * Helper for drawRect when the caller doesn't need separate local rects or matrices. 129 * Helper for drawRect when the caller doesn't need separate local rects or matrices.
130 */ 130 */
131 void drawSimpleRect(GrPipelineBuilder* ds, GrColor color, const SkMatrix& vi ewM, 131 void drawSimpleRect(GrPipelineBuilder* ds, GrColor color, const SkMatrix& vi ewM,
132 const SkRect& rect) { 132 const SkRect& rect) {
133 this->drawRect(ds, color, viewM, rect, NULL, NULL); 133 this->drawBWRect(ds, color, viewM, rect, NULL, NULL);
134 } 134 }
135 void drawSimpleRect(GrPipelineBuilder* ds, GrColor color, const SkMatrix& vi ewM, 135 void drawSimpleRect(GrPipelineBuilder* ds, GrColor color, const SkMatrix& vi ewM,
136 const SkIRect& irect) { 136 const SkIRect& irect) {
137 SkRect rect = SkRect::Make(irect); 137 SkRect rect = SkRect::Make(irect);
138 this->drawRect(ds, color, viewM, rect, NULL, NULL); 138 this->drawBWRect(ds, color, viewM, rect, NULL, NULL);
139 } 139 }
140 140
141 void drawAARect(GrPipelineBuilder* pipelineBuilder,
142 GrColor color,
143 const SkMatrix& viewMatrix,
144 const SkRect& rect,
145 const SkRect& devRect);
141 146
142 /** 147 /**
143 * Clear the passed in render target. Ignores the GrPipelineBuilder and clip . Clears the whole 148 * Clear the passed in render target. Ignores the GrPipelineBuilder and clip . Clears the whole
144 * thing if rect is NULL, otherwise just the rect. If canIgnoreRect is set t hen the entire 149 * thing if rect is NULL, otherwise just the rect. If canIgnoreRect is set t hen the entire
145 * render target can be optionally cleared. 150 * render target can be optionally cleared.
146 */ 151 */
147 void clear(const SkIRect* rect, 152 void clear(const SkIRect* rect,
148 GrColor color, 153 GrColor color,
149 bool canIgnoreRect, 154 bool canIgnoreRect,
150 GrRenderTarget* renderTarget); 155 GrRenderTarget* renderTarget);
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 virtual bool setupClip(GrPipelineBuilder*, 367 virtual bool setupClip(GrPipelineBuilder*,
363 GrPipelineBuilder::AutoRestoreFragmentProcessors*, 368 GrPipelineBuilder::AutoRestoreFragmentProcessors*,
364 GrPipelineBuilder::AutoRestoreStencil*, 369 GrPipelineBuilder::AutoRestoreStencil*,
365 GrScissorState* scissorState, 370 GrScissorState* scissorState,
366 const SkRect* devBounds) override; 371 const SkRect* devBounds) override;
367 372
368 typedef GrDrawTarget INHERITED; 373 typedef GrDrawTarget INHERITED;
369 }; 374 };
370 375
371 #endif 376 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698