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

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

Issue 12466008: PDF: add support for named destinations (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/pdf/SkPDFDevice.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 * 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 #include "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 9
10 #include "effects/GrTextureDomainEffect.h" 10 #include "effects/GrTextureDomainEffect.h"
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 590
591 // must be in SkCanvas::PointMode order 591 // must be in SkCanvas::PointMode order
592 static const GrPrimitiveType gPointMode2PrimtiveType[] = { 592 static const GrPrimitiveType gPointMode2PrimtiveType[] = {
593 kPoints_GrPrimitiveType, 593 kPoints_GrPrimitiveType,
594 kLines_GrPrimitiveType, 594 kLines_GrPrimitiveType,
595 kLineStrip_GrPrimitiveType 595 kLineStrip_GrPrimitiveType
596 }; 596 };
597 597
598 void SkGpuDevice::drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, 598 void SkGpuDevice::drawPoints(const SkDraw& draw, SkCanvas::PointMode mode,
599 size_t count, const SkPoint pts[], const SkPaint& p aint) { 599 size_t count, const SkPoint pts[], const SkPaint& p aint) {
600 CHECK_FOR_NODRAW_ANNOTATION(paint);
600 CHECK_SHOULD_DRAW(draw, false); 601 CHECK_SHOULD_DRAW(draw, false);
601 602
602 SkScalar width = paint.getStrokeWidth(); 603 SkScalar width = paint.getStrokeWidth();
603 if (width < 0) { 604 if (width < 0) {
604 return; 605 return;
605 } 606 }
606 607
607 // we only handle hairlines and paints without path effects or mask filters, 608 // we only handle hairlines and paints without path effects or mask filters,
608 // else we let the SkDraw call our drawPath() 609 // else we let the SkDraw call our drawPath()
609 if (width > 0 || paint.getPathEffect() || paint.getMaskFilter()) { 610 if (width > 0 || paint.getPathEffect() || paint.getMaskFilter()) {
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1833 GrTexture* texture, 1834 GrTexture* texture,
1834 bool needClear) 1835 bool needClear)
1835 : SkDevice(make_bitmap(context, texture->asRenderTarget())) { 1836 : SkDevice(make_bitmap(context, texture->asRenderTarget())) {
1836 1837
1837 GrAssert(texture && texture->asRenderTarget()); 1838 GrAssert(texture && texture->asRenderTarget());
1838 // This constructor is called from onCreateCompatibleDevice. It has locked t he RT in the texture 1839 // This constructor is called from onCreateCompatibleDevice. It has locked t he RT in the texture
1839 // cache. We pass true for the third argument so that it will get unlocked. 1840 // cache. We pass true for the third argument so that it will get unlocked.
1840 this->initFromRenderTarget(context, texture->asRenderTarget(), true); 1841 this->initFromRenderTarget(context, texture->asRenderTarget(), true);
1841 fNeedClear = needClear; 1842 fNeedClear = needClear;
1842 } 1843 }
OLDNEW
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698