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

Side by Side Diff: src/core/SkCanvas.cpp

Issue 13852049: Add GPU support for roundrects (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Initialize index buffer pointer to NULL Created 7 years, 8 months 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
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 "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 if (paint.canComputeFastBounds()) { 1574 if (paint.canComputeFastBounds()) {
1575 SkRect storage; 1575 SkRect storage;
1576 if (this->quickReject(paint.computeFastBounds(rrect.getBounds(), &storag e))) { 1576 if (this->quickReject(paint.computeFastBounds(rrect.getBounds(), &storag e))) {
1577 return; 1577 return;
1578 } 1578 }
1579 } 1579 }
1580 1580
1581 if (rrect.isRect()) { 1581 if (rrect.isRect()) {
1582 // call the non-virtual version 1582 // call the non-virtual version
1583 this->SkCanvas::drawRect(rrect.getBounds(), paint); 1583 this->SkCanvas::drawRect(rrect.getBounds(), paint);
1584 } else { 1584 return;
reed1 2013/04/25 13:33:55 Do you think we should also check for isOval at th
jvanverth1 2013/04/25 13:37:47 Good idea, I'll do that before committing.
1585 SkPath path; 1585 }
1586 path.addRRect(rrect); 1586
1587 // call the non-virtual version 1587 LOOPER_BEGIN(paint, SkDrawFilter::kRRect_Type)
1588 this->SkCanvas::drawPath(path, paint); 1588
1589 while (iter.next()) {
1590 iter.fDevice->drawRRect(iter, rrect, looper.paint());
1589 } 1591 }
1592
1593 LOOPER_END
1590 } 1594 }
1591 1595
1592 1596
1593 void SkCanvas::drawPath(const SkPath& path, const SkPaint& paint) { 1597 void SkCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
1594 CHECK_SHADER_NOSETCONTEXT(paint); 1598 CHECK_SHADER_NOSETCONTEXT(paint);
1595 1599
1596 if (!path.isFinite()) { 1600 if (!path.isFinite()) {
1597 return; 1601 return;
1598 } 1602 }
1599 1603
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 return *paint; 2132 return *paint;
2129 } 2133 }
2130 2134
2131 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } 2135 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); }
2132 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } 2136 int SkCanvas::LayerIter::x() const { return fImpl->getX(); }
2133 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } 2137 int SkCanvas::LayerIter::y() const { return fImpl->getY(); }
2134 2138
2135 /////////////////////////////////////////////////////////////////////////////// 2139 ///////////////////////////////////////////////////////////////////////////////
2136 2140
2137 SkCanvas::ClipVisitor::~ClipVisitor() { } 2141 SkCanvas::ClipVisitor::~ClipVisitor() { }
OLDNEW
« include/core/SkDevice.h ('K') | « include/gpu/SkGpuDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698