OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrGpu_DEFINED | 8 #ifndef GrGpu_DEFINED |
9 #define GrGpu_DEFINED | 9 #define GrGpu_DEFINED |
10 | 10 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
355 * Takes the current active set of markers and stores them for later use. An y current marker | 355 * Takes the current active set of markers and stores them for later use. An y current marker |
356 * in the active set is removed from the active set and the targets remove f unction is called. | 356 * in the active set is removed from the active set and the targets remove f unction is called. |
357 * These functions do not work as a stack so you cannot call save a second t ime before calling | 357 * These functions do not work as a stack so you cannot call save a second t ime before calling |
358 * restore. Also, it is assumed that when restore is called the current acti ve set of markers | 358 * restore. Also, it is assumed that when restore is called the current acti ve set of markers |
359 * is empty. When the stored markers are added back into the active set, the targets add marker | 359 * is empty. When the stored markers are added back into the active set, the targets add marker |
360 * is called. | 360 * is called. |
361 */ | 361 */ |
362 void saveActiveTraceMarkers(); | 362 void saveActiveTraceMarkers(); |
363 void restoreActiveTraceMarkers(); | 363 void restoreActiveTraceMarkers(); |
364 | 364 |
365 // creation and deletion of raw texture for testing | |
366 virtual GrBackendObject createBackendTexture(void* pixels, int w, int h, | |
robertphillips
2015/07/10 18:45:18
tab this over ?
jvanverth1
2015/07/10 19:59:44
Done.
| |
367 GrPixelConfig config) const = 0; | |
368 virtual bool isBackendTexture(GrBackendObject id) const = 0; | |
369 virtual void deleteBackendTexture(GrBackendObject id) const = 0; | |
370 | |
365 // Given a rt, find or create a stencil buffer and attach it | 371 // Given a rt, find or create a stencil buffer and attach it |
366 bool attachStencilAttachmentToRenderTarget(GrRenderTarget* target); | 372 bool attachStencilAttachmentToRenderTarget(GrRenderTarget* target); |
367 | 373 |
368 // This is only to be used in tests. | |
369 virtual const GrGLContext* glContextForTesting() const { return NULL; } | |
370 | |
371 protected: | 374 protected: |
372 // Functions used to map clip-respecting stencil tests into normal | 375 // Functions used to map clip-respecting stencil tests into normal |
373 // stencil funcs supported by GPUs. | 376 // stencil funcs supported by GPUs. |
374 static GrStencilFunc ConvertStencilFunc(bool stencilInClip, | 377 static GrStencilFunc ConvertStencilFunc(bool stencilInClip, |
375 GrStencilFunc func); | 378 GrStencilFunc func); |
376 static void ConvertStencilFuncAndMask(GrStencilFunc func, | 379 static void ConvertStencilFuncAndMask(GrStencilFunc func, |
377 bool clipInStencil, | 380 bool clipInStencil, |
378 unsigned int clipBit, | 381 unsigned int clipBit, |
379 unsigned int userBits, | 382 unsigned int userBits, |
380 unsigned int* ref, | 383 unsigned int* ref, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
467 GrTraceMarkerSet fActiveT raceMarkers; | 470 GrTraceMarkerSet fActiveT raceMarkers; |
468 GrTraceMarkerSet fStoredT raceMarkers; | 471 GrTraceMarkerSet fStoredT raceMarkers; |
469 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 472 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
470 GrContext* fContext ; | 473 GrContext* fContext ; |
471 | 474 |
472 friend class GrPathRendering; | 475 friend class GrPathRendering; |
473 typedef SkRefCnt INHERITED; | 476 typedef SkRefCnt INHERITED; |
474 }; | 477 }; |
475 | 478 |
476 #endif | 479 #endif |
OLD | NEW |