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

Side by Side Diff: src/gpu/GrGpu.cpp

Issue 676983003: Clip mask manager sets stencil on draw type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bug fix Created 6 years, 1 month 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 | « src/gpu/GrGpu.h ('k') | src/gpu/gl/GrGpuGL.h » ('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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 6, 291 6,
292 MAX_QUADS, 292 MAX_QUADS,
293 4); 293 4);
294 } 294 }
295 295
296 return fQuadIndexBuffer; 296 return fQuadIndexBuffer;
297 } 297 }
298 298
299 //////////////////////////////////////////////////////////////////////////////// 299 ////////////////////////////////////////////////////////////////////////////////
300 300
301 bool GrGpu::setupClipAndFlushState(DrawType type, const GrDeviceCoordTexture* ds tCopy, 301 bool GrGpu::setupClipAndFlushState(DrawType type,
302 const GrDeviceCoordTexture* dstCopy,
302 GrDrawState::AutoRestoreEffects* are, 303 GrDrawState::AutoRestoreEffects* are,
303 const SkRect* devBounds) { 304 const SkRect* devBounds) {
304 if (!fClipMaskManager.setupClipping(this->getClip(), are, devBounds)) { 305 GrDrawState::AutoRestoreStencil asr;
306 if (!fClipMaskManager.setupClipping(this->getClip(), are, &asr, devBounds)) {
305 return false; 307 return false;
306 } 308 }
307 309
308 if (!this->flushGraphicsState(type, dstCopy)) { 310 if (!this->flushGraphicsState(type, dstCopy)) {
309 return false; 311 return false;
310 } 312 }
311 313
312 return true; 314 return true;
313 } 315 }
314 316
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 } 526 }
525 527
526 void GrGpu::releaseIndexArray() { 528 void GrGpu::releaseIndexArray() {
527 // if index source was array, we stowed data in the pool 529 // if index source was array, we stowed data in the pool
528 const GeometrySrcState& geoSrc = this->getGeomSrc(); 530 const GeometrySrcState& geoSrc = this->getGeomSrc();
529 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); 531 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc);
530 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); 532 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t);
531 fIndexPool->putBack(bytes); 533 fIndexPool->putBack(bytes);
532 --fIndexPoolUseCnt; 534 --fIndexPoolUseCnt;
533 } 535 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698