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 GrGLGpu_DEFINED | 8 #ifndef GrGLGpu_DEFINED |
9 #define GrGLGpu_DEFINED | 9 #define GrGLGpu_DEFINED |
10 | 10 |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 334 |
335 GrGLIRect fHWViewport; | 335 GrGLIRect fHWViewport; |
336 | 336 |
337 /** | 337 /** |
338 * Tracks bound vertex and index buffers and vertex attrib array state. | 338 * Tracks bound vertex and index buffers and vertex attrib array state. |
339 */ | 339 */ |
340 class HWGeometryState { | 340 class HWGeometryState { |
341 public: | 341 public: |
342 HWGeometryState() { fVBOVertexArray = NULL; this->invalidate(); } | 342 HWGeometryState() { fVBOVertexArray = NULL; this->invalidate(); } |
343 | 343 |
344 ~HWGeometryState() { SkDELETE(fVBOVertexArray); } | 344 ~HWGeometryState() { delete fVBOVertexArray; } |
345 | 345 |
346 void invalidate() { | 346 void invalidate() { |
347 fBoundVertexArrayIDIsValid = false; | 347 fBoundVertexArrayIDIsValid = false; |
348 fBoundVertexBufferIDIsValid = false; | 348 fBoundVertexBufferIDIsValid = false; |
349 fDefaultVertexArrayBoundIndexBufferID = false; | 349 fDefaultVertexArrayBoundIndexBufferID = false; |
350 fDefaultVertexArrayBoundIndexBufferIDIsValid = false; | 350 fDefaultVertexArrayBoundIndexBufferIDIsValid = false; |
351 fDefaultVertexArrayAttribState.invalidate(); | 351 fDefaultVertexArrayAttribState.invalidate(); |
352 if (fVBOVertexArray) { | 352 if (fVBOVertexArray) { |
353 fVBOVertexArray->invalidateCachedState(); | 353 fVBOVertexArray->invalidateCachedState(); |
354 } | 354 } |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 495 |
496 // we record what stencil format worked last time to hopefully exit early | 496 // we record what stencil format worked last time to hopefully exit early |
497 // from our loop that tries stencil formats and calls check fb status. | 497 // from our loop that tries stencil formats and calls check fb status. |
498 int fLastSuccessfulStencilFmtIdx; | 498 int fLastSuccessfulStencilFmtIdx; |
499 | 499 |
500 typedef GrGpu INHERITED; | 500 typedef GrGpu INHERITED; |
501 friend class GrGLPathRendering; // For accessing setTextureUnit. | 501 friend class GrGLPathRendering; // For accessing setTextureUnit. |
502 }; | 502 }; |
503 | 503 |
504 #endif | 504 #endif |
OLD | NEW |