OLD | NEW |
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 "GrInOrderDrawBuffer.h" | 8 #include "GrInOrderDrawBuffer.h" |
9 | 9 |
10 #include "GrBufferAllocPool.h" | 10 #include "GrBufferAllocPool.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 static uint8_t add_trace_bit(uint8_t cmd) { | 126 static uint8_t add_trace_bit(uint8_t cmd) { |
127 return cmd | kTraceCmdBit; | 127 return cmd | kTraceCmdBit; |
128 } | 128 } |
129 | 129 |
130 static uint8_t strip_trace_bit(uint8_t cmd) { | 130 static uint8_t strip_trace_bit(uint8_t cmd) { |
131 return cmd & kCmdMask; | 131 return cmd & kCmdMask; |
132 } | 132 } |
133 | 133 |
134 static bool cmd_has_trace_marker(uint8_t cmd) { | 134 static bool cmd_has_trace_marker(uint8_t cmd) { |
135 return cmd & kTraceCmdBit; | 135 return SkToBool(cmd & kTraceCmdBit); |
136 } | 136 } |
137 | 137 |
138 void GrInOrderDrawBuffer::onDrawRect(const SkRect& rect, | 138 void GrInOrderDrawBuffer::onDrawRect(const SkRect& rect, |
139 const SkMatrix* matrix, | 139 const SkMatrix* matrix, |
140 const SkRect* localRect, | 140 const SkRect* localRect, |
141 const SkMatrix* localMatrix) { | 141 const SkMatrix* localMatrix) { |
142 GrDrawState::AutoColorRestore acr; | 142 GrDrawState::AutoColorRestore acr; |
143 | 143 |
144 GrDrawState* drawState = this->drawState(); | 144 GrDrawState* drawState = this->drawState(); |
145 | 145 |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 this->addToCmdBuffer(kCopySurface_Cmd); | 963 this->addToCmdBuffer(kCopySurface_Cmd); |
964 return &fCopySurfaces.push_back(); | 964 return &fCopySurfaces.push_back(); |
965 } | 965 } |
966 | 966 |
967 | 967 |
968 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 968 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
969 INHERITED::clipWillBeSet(newClipData); | 969 INHERITED::clipWillBeSet(newClipData); |
970 fClipSet = true; | 970 fClipSet = true; |
971 fClipProxyState = kUnknown_ClipProxyState; | 971 fClipProxyState = kUnknown_ClipProxyState; |
972 } | 972 } |
OLD | NEW |