diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-10-12 19:53:16 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-10-12 19:53:16 +0000 |
commit | d38f137e9b813f8193675ebd3dfbfe8bc42639e9 (patch) | |
tree | 1e670c378d7b31a4538fde3c2b3e4e29b72c05b5 /src/gpu/GrPathRenderer.cpp | |
parent | 4d5cb45f3e3e62633304b4911d131cdd02dfd541 (diff) |
Move gpu/include/* to include/gpu and gpu/src/* to src/gpu
Review URL: http://codereview.appspot.com/5250070/
git-svn-id: http://skia.googlecode.com/svn/trunk@2471 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrPathRenderer.cpp')
-rw-r--r-- | src/gpu/GrPathRenderer.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/gpu/GrPathRenderer.cpp b/src/gpu/GrPathRenderer.cpp new file mode 100644 index 0000000000..929941a47e --- /dev/null +++ b/src/gpu/GrPathRenderer.cpp @@ -0,0 +1,41 @@ + +/* + * Copyright 2011 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "GrPathRenderer.h" + +GrPathRenderer::GrPathRenderer() + : fPath(NULL) + , fTarget(NULL) { +} + +void GrPathRenderer::setPath(GrDrawTarget* target, + const SkPath* path, + GrPathFill fill, + const GrPoint* translate) { + GrAssert(NULL == fPath); + GrAssert(NULL == fTarget); + GrAssert(NULL != target); + + fTarget = target; + fPath = path; + fFill = fill; + if (NULL != translate) { + fTranslate = *translate; + } else { + fTranslate.fX = fTranslate.fY = 0; + } + this->pathWasSet(); +} + +void GrPathRenderer::clearPath() { + this->pathWillClear(); + fTarget->resetVertexSource(); + fTarget->resetIndexSource(); + fTarget = NULL; + fPath = NULL; +} |