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

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

Issue 1652053004: Add Histogram Macros to Skia (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fix unused constant error in release w/ enum-based constant Created 4 years, 10 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
« src/core/SkImageCacherator.cpp ('K') | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | 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 2015 Google Inc. 2 * Copyright 2015 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 "GrBlurUtils.h" 10 #include "GrBlurUtils.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 ////////////////////////////////////////////////////////////////////////////// 88 //////////////////////////////////////////////////////////////////////////////
89 89
90 void SkGpuDevice::drawTextureProducer(GrTextureProducer* producer, 90 void SkGpuDevice::drawTextureProducer(GrTextureProducer* producer,
91 const SkRect* srcRect, 91 const SkRect* srcRect,
92 const SkRect* dstRect, 92 const SkRect* dstRect,
93 SkCanvas::SrcRectConstraint constraint, 93 SkCanvas::SrcRectConstraint constraint,
94 const SkMatrix& viewMatrix, 94 const SkMatrix& viewMatrix,
95 const GrClip& clip, 95 const GrClip& clip,
96 const SkPaint& paint) { 96 const SkPaint& paint) {
97 // This is the funnel for all non-tiled bitmap/image draw calls. Log a histo gram entry.
98 SK_HISTOGRAM_BOOLEAN("DrawTiled", false);
99
97 // Figure out the actual dst and src rect by clipping the src rect to the bo unds of the 100 // Figure out the actual dst and src rect by clipping the src rect to the bo unds of the
98 // adjuster. If the src rect is clipped then the dst rect must be recomputed . Also determine 101 // adjuster. If the src rect is clipped then the dst rect must be recomputed . Also determine
99 // the matrix that maps the src rect to the dst rect. 102 // the matrix that maps the src rect to the dst rect.
100 SkRect clippedSrcRect; 103 SkRect clippedSrcRect;
101 SkRect clippedDstRect; 104 SkRect clippedDstRect;
102 const SkRect srcBounds = SkRect::MakeIWH(producer->width(), producer->height ()); 105 const SkRect srcBounds = SkRect::MakeIWH(producer->width(), producer->height ());
103 SkMatrix srcToDstMatrix; 106 SkMatrix srcToDstMatrix;
104 if (srcRect) { 107 if (srcRect) {
105 if (!dstRect) { 108 if (!dstRect) {
106 dstRect = &srcBounds; 109 dstRect = &srcBounds;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 rrect)) { 233 rrect)) {
231 return; 234 return;
232 } 235 }
233 SkPath rectPath; 236 SkPath rectPath;
234 rectPath.addRect(clippedDstRect); 237 rectPath.addRect(clippedDstRect);
235 rectPath.setIsVolatile(true); 238 rectPath.setIsVolatile(true);
236 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext, fClip, 239 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext, fClip,
237 rectPath, &grPaint, viewMatrix, mf, pain t.getPathEffect(), 240 rectPath, &grPaint, viewMatrix, mf, pain t.getPathEffect(),
238 GrStrokeInfo::FillInfo(), true); 241 GrStrokeInfo::FillInfo(), true);
239 } 242 }
OLDNEW
« src/core/SkImageCacherator.cpp ('K') | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698