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

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

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years 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/gpu/GrPathUtils.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 27 matching lines...) Expand all
38 if (gShouldDrawProc && !gShouldDrawProc()) return; \ 38 if (gShouldDrawProc && !gShouldDrawProc()) return; \
39 this->prepareDraw(draw, forceI); \ 39 this->prepareDraw(draw, forceI); \
40 } while (0) 40 } while (0)
41 #else 41 #else
42 #define CHECK_SHOULD_DRAW(draw, forceI) this->prepareDraw(draw, forceI) 42 #define CHECK_SHOULD_DRAW(draw, forceI) this->prepareDraw(draw, forceI)
43 #endif 43 #endif
44 44
45 // This constant represents the screen alignment criterion in texels for 45 // This constant represents the screen alignment criterion in texels for
46 // requiring texture domain clamping to prevent color bleeding when drawing 46 // requiring texture domain clamping to prevent color bleeding when drawing
47 // a sub region of a larger source image. 47 // a sub region of a larger source image.
48 #define COLOR_BLEED_TOLERANCE SkFloatToScalar(0.001f) 48 #define COLOR_BLEED_TOLERANCE 0.001f
49 49
50 #define DO_DEFERRED_CLEAR() \ 50 #define DO_DEFERRED_CLEAR() \
51 do { \ 51 do { \
52 if (fNeedClear) { \ 52 if (fNeedClear) { \
53 this->clear(SK_ColorTRANSPARENT); \ 53 this->clear(SK_ColorTRANSPARENT); \
54 } \ 54 } \
55 } while (false) \ 55 } while (false) \
56 56
57 /////////////////////////////////////////////////////////////////////////////// 57 ///////////////////////////////////////////////////////////////////////////////
58 58
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1847 GrTexture* texture, 1847 GrTexture* texture,
1848 bool needClear) 1848 bool needClear)
1849 : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) { 1849 : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) {
1850 1850
1851 SkASSERT(texture && texture->asRenderTarget()); 1851 SkASSERT(texture && texture->asRenderTarget());
1852 // This constructor is called from onCreateCompatibleDevice. It has locked t he RT in the texture 1852 // This constructor is called from onCreateCompatibleDevice. It has locked t he RT in the texture
1853 // cache. We pass true for the third argument so that it will get unlocked. 1853 // cache. We pass true for the third argument so that it will get unlocked.
1854 this->initFromRenderTarget(context, texture->asRenderTarget(), true); 1854 this->initFromRenderTarget(context, texture->asRenderTarget(), true);
1855 fNeedClear = needClear; 1855 fNeedClear = needClear;
1856 } 1856 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathUtils.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698