| OLD | NEW |
| 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 GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
| 9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
| 10 | 10 |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 sk_bzero(fDrawContext, sizeof(fDrawContext)); | 423 sk_bzero(fDrawContext, sizeof(fDrawContext)); |
| 424 } | 424 } |
| 425 | 425 |
| 426 ~DrawingMgr(); | 426 ~DrawingMgr(); |
| 427 | 427 |
| 428 void init(GrContext* context); | 428 void init(GrContext* context); |
| 429 | 429 |
| 430 void abandon(); | 430 void abandon(); |
| 431 bool abandoned() const { return NULL == fDrawTarget; } | 431 bool abandoned() const { return NULL == fDrawTarget; } |
| 432 | 432 |
| 433 void purgeResources(); | |
| 434 void reset(); | 433 void reset(); |
| 435 void flush(); | 434 void flush(); |
| 436 | 435 |
| 437 // Callers should take a ref if they rely on the GrDrawContext sticking
around. | 436 // Callers should take a ref if they rely on the GrDrawContext sticking
around. |
| 438 // NULL will be returned if the context has been abandoned. | 437 // NULL will be returned if the context has been abandoned. |
| 439 GrDrawContext* drawContext(const SkSurfaceProps* surfaceProps); | 438 GrDrawContext* drawContext(const SkSurfaceProps* surfaceProps); |
| 440 | 439 |
| 441 private: | 440 private: |
| 442 void cleanup(); | 441 void cleanup(); |
| 443 | 442 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 /** | 482 /** |
| 484 * A callback similar to the above for use by the TextBlobCache | 483 * A callback similar to the above for use by the TextBlobCache |
| 485 * TODO move textblob draw calls below context so we can use the call above. | 484 * TODO move textblob draw calls below context so we can use the call above. |
| 486 */ | 485 */ |
| 487 static void TextBlobCacheOverBudgetCB(void* data); | 486 static void TextBlobCacheOverBudgetCB(void* data); |
| 488 | 487 |
| 489 typedef SkRefCnt INHERITED; | 488 typedef SkRefCnt INHERITED; |
| 490 }; | 489 }; |
| 491 | 490 |
| 492 #endif | 491 #endif |
| OLD | NEW |