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

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

Issue 1144433002: Move copy-surface-as-draw fallback to GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@vares
Patch Set: remove incorrect assert 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 | « no previous file | 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 */ 171 */
172 void saveActiveTraceMarkers(); 172 void saveActiveTraceMarkers();
173 void restoreActiveTraceMarkers(); 173 void restoreActiveTraceMarkers();
174 174
175 /** 175 /**
176 * Copies a pixel rectangle from one surface to another. This call may final ize 176 * Copies a pixel rectangle from one surface to another. This call may final ize
177 * reserved vertex/index data (as though a draw call was made). The src pixe ls 177 * reserved vertex/index data (as though a draw call was made). The src pixe ls
178 * copied are specified by srcRect. They are copied to a rect of the same 178 * copied are specified by srcRect. They are copied to a rect of the same
179 * size in dst with top left at dstPoint. If the src rect is clipped by the 179 * size in dst with top left at dstPoint. If the src rect is clipped by the
180 * src bounds then pixel values in the dst rect corresponding to area clipp ed 180 * src bounds then pixel values in the dst rect corresponding to area clipp ed
181 * by the src rect are not overwritten. This method can fail and return fals e 181 * by the src rect are not overwritten. This method is not guaranteed to suc ceed
182 * depending on the type of surface, configs, etc, and the backend-specific 182 * depending on the type of surface, configs, etc, and the backend-specific
183 * limitations. If rect is clipped out entirely by the src or dst bounds the n 183 * limitations.
184 * true is returned since there is no actual copy necessary to succeed.
185 */ 184 */
186 bool copySurface(GrSurface* dst, 185 void copySurface(GrSurface* dst,
187 GrSurface* src, 186 GrSurface* src,
188 const SkIRect& srcRect, 187 const SkIRect& srcRect,
189 const SkIPoint& dstPoint); 188 const SkIPoint& dstPoint);
190 /** 189 /**
191 * Function that determines whether a copySurface call would succeed without actually
192 * performing the copy.
193 */
194 bool canCopySurface(const GrSurface* dst,
195 const GrSurface* src,
196 const SkIRect& srcRect,
197 const SkIPoint& dstPoint);
198
199 /**
200 * Release any resources that are cached but not currently in use. This 190 * Release any resources that are cached but not currently in use. This
201 * is intended to give an application some recourse when resources are low. 191 * is intended to give an application some recourse when resources are low.
202 */ 192 */
203 virtual void purgeResources() {}; 193 virtual void purgeResources() {};
204 194
205 /////////////////////////////////////////////////////////////////////////// 195 ///////////////////////////////////////////////////////////////////////////
206 // Draw execution tracking (for font atlases and other resources) 196 // Draw execution tracking (for font atlases and other resources)
207 class DrawToken { 197 class DrawToken {
208 public: 198 public:
209 DrawToken(GrDrawTarget* drawTarget, uint32_t drawID) : 199 DrawToken(GrDrawTarget* drawTarget, uint32_t drawID) :
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 virtual bool setupClip(GrPipelineBuilder*, 368 virtual bool setupClip(GrPipelineBuilder*,
379 GrPipelineBuilder::AutoRestoreFragmentProcessors*, 369 GrPipelineBuilder::AutoRestoreFragmentProcessors*,
380 GrPipelineBuilder::AutoRestoreStencil*, 370 GrPipelineBuilder::AutoRestoreStencil*,
381 GrScissorState* scissorState, 371 GrScissorState* scissorState,
382 const SkRect* devBounds) override; 372 const SkRect* devBounds) override;
383 373
384 typedef GrDrawTarget INHERITED; 374 typedef GrDrawTarget INHERITED;
385 }; 375 };
386 376
387 #endif 377 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698