OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 SkGpuDevice_DEFINED | 8 #ifndef SkGpuDevice_DEFINED |
9 #define SkGpuDevice_DEFINED | 9 #define SkGpuDevice_DEFINED |
10 | 10 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 const SkMatrix*, const SkPaint*) overr
ide; | 146 const SkMatrix*, const SkPaint*) overr
ide; |
147 | 147 |
148 private: | 148 private: |
149 // We want these unreffed in DrawContext, RenderTarget, GrContext order. | 149 // We want these unreffed in DrawContext, RenderTarget, GrContext order. |
150 SkAutoTUnref<GrContext> fContext; | 150 SkAutoTUnref<GrContext> fContext; |
151 SkAutoTUnref<GrRenderTarget> fRenderTarget; | 151 SkAutoTUnref<GrRenderTarget> fRenderTarget; |
152 sk_sp<GrDrawContext> fDrawContext; | 152 sk_sp<GrDrawContext> fDrawContext; |
153 | 153 |
154 SkAutoTUnref<const SkClipStack> fClipStack; | 154 SkAutoTUnref<const SkClipStack> fClipStack; |
155 SkIPoint fClipOrigin; | 155 SkIPoint fClipOrigin; |
156 GrClip fClip;; | 156 GrClipStackClip fClip; |
157 // remove when our clients don't rely on accessBitmap() | 157 // remove when our clients don't rely on accessBitmap() |
158 SkBitmap fLegacyBitmap; | 158 SkBitmap fLegacyBitmap; |
159 bool fOpaque; | 159 bool fOpaque; |
160 | 160 |
161 enum Flags { | 161 enum Flags { |
162 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear | 162 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear |
163 kIsOpaque_Flag = 1 << 1, //!< Hint from client that rendering to this
device will be | 163 kIsOpaque_Flag = 1 << 1, //!< Hint from client that rendering to this
device will be |
164 // opaque even if the config supports alpha
. | 164 // opaque even if the config supports alpha
. |
165 }; | 165 }; |
166 static bool CheckAlphaTypeAndGetFlags(const SkImageInfo* info, InitContents
init, | 166 static bool CheckAlphaTypeAndGetFlags(const SkImageInfo* info, InitContents
init, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 | 254 |
255 void drawSpriteWithFilter(const SkDraw&, const SkBitmap&, int x, int y, | 255 void drawSpriteWithFilter(const SkDraw&, const SkBitmap&, int x, int y, |
256 const SkPaint&) override; | 256 const SkPaint&) override; |
257 | 257 |
258 friend class GrAtlasTextContext; | 258 friend class GrAtlasTextContext; |
259 friend class SkSurface_Gpu; // for access to surfaceProps | 259 friend class SkSurface_Gpu; // for access to surfaceProps |
260 typedef SkBaseDevice INHERITED; | 260 typedef SkBaseDevice INHERITED; |
261 }; | 261 }; |
262 | 262 |
263 #endif | 263 #endif |
OLD | NEW |