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

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

Issue 1971343002: Convert GrClip to an abstract base class (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_clipout
Patch Set: fix crash Created 4 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/GrClip.h ('k') | src/core/SkImageFilter.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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 * Indicates the type of pending IO operations that can be recorded for gpu reso urces. 394 * Indicates the type of pending IO operations that can be recorded for gpu reso urces.
395 */ 395 */
396 enum GrIOType { 396 enum GrIOType {
397 kRead_GrIOType, 397 kRead_GrIOType,
398 kWrite_GrIOType, 398 kWrite_GrIOType,
399 kRW_GrIOType 399 kRW_GrIOType
400 }; 400 };
401 401
402 struct GrScissorState { 402 struct GrScissorState {
403 GrScissorState() : fEnabled(false) {} 403 GrScissorState() : fEnabled(false) {}
404 GrScissorState(const SkIRect& rect) : fEnabled(true), fRect(rect) {}
405 void setDisabled() { fEnabled = false; }
404 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; } 406 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; }
405 bool operator==(const GrScissorState& other) const { 407 bool operator==(const GrScissorState& other) const {
406 return fEnabled == other.fEnabled && 408 return fEnabled == other.fEnabled &&
407 (false == fEnabled || fRect == other.fRect); 409 (false == fEnabled || fRect == other.fRect);
408 } 410 }
409 bool operator!=(const GrScissorState& other) const { return !(*this == other ); } 411 bool operator!=(const GrScissorState& other) const { return !(*this == other ); }
410 412
411 bool enabled() const { return fEnabled; } 413 bool enabled() const { return fEnabled; }
412 const SkIRect& rect() const { return fRect; } 414 const SkIRect& rect() const { return fRect; }
413 415
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 * Specifies if the holder owns the backend, OpenGL or Vulkan, object. 470 * Specifies if the holder owns the backend, OpenGL or Vulkan, object.
469 */ 471 */
470 enum class GrBackendObjectOwnership : bool { 472 enum class GrBackendObjectOwnership : bool {
471 /** Holder does not destroy the backend object. */ 473 /** Holder does not destroy the backend object. */
472 kBorrowed = false, 474 kBorrowed = false,
473 /** Holder destroys the backend object. */ 475 /** Holder destroys the backend object. */
474 kOwned = true 476 kOwned = true
475 }; 477 };
476 478
477 #endif 479 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrClip.h ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698