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

Side by Side Diff: include/gpu/GrTypesPriv.h

Issue 1128903008: add option to supress prints on context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 7 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
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrDrawTarget.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 2013 Google Inc. 2 * Copyright 2013 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 #ifndef GrTypesPriv_DEFINED 8 #ifndef GrTypesPriv_DEFINED
9 #define GrTypesPriv_DEFINED 9 #define GrTypesPriv_DEFINED
10 10
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 bool operator!=(const GrScissorState& other) const { return !(*this == other ); } 257 bool operator!=(const GrScissorState& other) const { return !(*this == other ); }
258 258
259 bool enabled() const { return fEnabled; } 259 bool enabled() const { return fEnabled; }
260 const SkIRect& rect() const { return fRect; } 260 const SkIRect& rect() const { return fRect; }
261 261
262 private: 262 private:
263 bool fEnabled; 263 bool fEnabled;
264 SkIRect fRect; 264 SkIRect fRect;
265 }; 265 };
266 266
267 #ifdef SK_DEBUG
268 // Takes a pointer to a GrContext, and will suppress prints if required
269 #define GrContextDebugf(context, ...) \
270 if (!context->suppressPrints()) { \
271 SkDebugf(__VA_ARGS__); \
272 }
273 #else
274 #define GrContextDebugf(context, ...)
267 #endif 275 #endif
276
277 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698