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

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

Issue 1142003003: Revert of Move copy-surface-as-draw fallback to GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@vares
Patch Set: 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 is not guaranteed to suc ceed 181 * by the src rect are not overwritten. This method can fail and return fals e
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. 183 * limitations. If rect is clipped out entirely by the src or dst bounds the n
184 * true is returned since there is no actual copy necessary to succeed.
184 */ 185 */
185 void copySurface(GrSurface* dst, 186 bool copySurface(GrSurface* dst,
186 GrSurface* src, 187 GrSurface* src,
187 const SkIRect& srcRect, 188 const SkIRect& srcRect,
188 const SkIPoint& dstPoint); 189 const SkIPoint& dstPoint);
189 /** 190 /**
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 /**
190 * Release any resources that are cached but not currently in use. This 200 * Release any resources that are cached but not currently in use. This
191 * is intended to give an application some recourse when resources are low. 201 * is intended to give an application some recourse when resources are low.
192 */ 202 */
193 virtual void purgeResources() {}; 203 virtual void purgeResources() {};
194 204
195 /////////////////////////////////////////////////////////////////////////// 205 ///////////////////////////////////////////////////////////////////////////
196 // Draw execution tracking (for font atlases and other resources) 206 // Draw execution tracking (for font atlases and other resources)
197 class DrawToken { 207 class DrawToken {
198 public: 208 public:
199 DrawToken(GrDrawTarget* drawTarget, uint32_t drawID) : 209 DrawToken(GrDrawTarget* drawTarget, uint32_t drawID) :
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 virtual bool setupClip(GrPipelineBuilder*, 378 virtual bool setupClip(GrPipelineBuilder*,
369 GrPipelineBuilder::AutoRestoreFragmentProcessors*, 379 GrPipelineBuilder::AutoRestoreFragmentProcessors*,
370 GrPipelineBuilder::AutoRestoreStencil*, 380 GrPipelineBuilder::AutoRestoreStencil*,
371 GrScissorState* scissorState, 381 GrScissorState* scissorState,
372 const SkRect* devBounds) override; 382 const SkRect* devBounds) override;
373 383
374 typedef GrDrawTarget INHERITED; 384 typedef GrDrawTarget INHERITED;
375 }; 385 };
376 386
377 #endif 387 #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