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

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

Issue 683483004: aa rect renderer takes a gpu on construction (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc 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/GrAARectRenderer.cpp ('k') | src/gpu/GrContext.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 #include "GrClipMaskManager.h" 9 #include "GrClipMaskManager.h"
10 #include "GrAAConvexPathRenderer.h" 10 #include "GrAAConvexPathRenderer.h"
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // TODO: Draw rrects directly here. 391 // TODO: Draw rrects directly here.
392 switch (element->getType()) { 392 switch (element->getType()) {
393 case Element::kEmpty_Type: 393 case Element::kEmpty_Type:
394 SkDEBUGFAIL("Should never get here with an empty element."); 394 SkDEBUGFAIL("Should never get here with an empty element.");
395 break; 395 break;
396 case Element::kRect_Type: 396 case Element::kRect_Type:
397 // TODO: Do rects directly to the accumulator using a aa-rect GrProc essor that covers 397 // TODO: Do rects directly to the accumulator using a aa-rect GrProc essor that covers
398 // the entire mask bounds and writes 0 outside the rect. 398 // the entire mask bounds and writes 0 outside the rect.
399 if (element->isAA()) { 399 if (element->isAA()) {
400 this->getContext()->getAARectRenderer()->fillAARect(fGpu, 400 this->getContext()->getAARectRenderer()->fillAARect(fGpu,
401 fGpu,
402 element->get Rect(), 401 element->get Rect(),
403 SkMatrix::I( ), 402 SkMatrix::I( ),
404 element->get Rect()); 403 element->get Rect());
405 } else { 404 } else {
406 fGpu->drawSimpleRect(element->getRect()); 405 fGpu->drawSimpleRect(element->getRect());
407 } 406 }
408 return true; 407 return true;
409 default: { 408 default: {
410 SkPath path; 409 SkPath path;
411 element->asPath(&path); 410 element->asPath(&path);
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 1130
1132 // TODO: dynamically attach a stencil buffer 1131 // TODO: dynamically attach a stencil buffer
1133 int stencilBits = 0; 1132 int stencilBits = 0;
1134 GrStencilBuffer* stencilBuffer = 1133 GrStencilBuffer* stencilBuffer =
1135 drawState.getRenderTarget()->getStencilBuffer(); 1134 drawState.getRenderTarget()->getStencilBuffer();
1136 if (stencilBuffer) { 1135 if (stencilBuffer) {
1137 stencilBits = stencilBuffer->bits(); 1136 stencilBits = stencilBuffer->bits();
1138 this->adjustStencilParams(settings, clipMode, stencilBits); 1137 this->adjustStencilParams(settings, clipMode, stencilBits);
1139 } 1138 }
1140 } 1139 }
OLDNEW
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698