| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 const SkPaint&) SK_OVERRIDE; | 103 const SkPaint&) SK_OVERRIDE; |
| 104 virtual bool filterTextFlags(const SkPaint&, TextFlags*) SK_OVERRIDE; | 104 virtual bool filterTextFlags(const SkPaint&, TextFlags*) SK_OVERRIDE; |
| 105 | 105 |
| 106 virtual void flush() SK_OVERRIDE; | 106 virtual void flush() SK_OVERRIDE; |
| 107 | 107 |
| 108 virtual void onAttachToCanvas(SkCanvas* canvas) SK_OVERRIDE; | 108 virtual void onAttachToCanvas(SkCanvas* canvas) SK_OVERRIDE; |
| 109 virtual void onDetachFromCanvas() SK_OVERRIDE; | 109 virtual void onDetachFromCanvas() SK_OVERRIDE; |
| 110 | 110 |
| 111 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE; | 111 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE; |
| 112 | 112 |
| 113 /** | |
| 114 * Make's this device's rendertarget current in the underlying 3D API. | |
| 115 * Also implicitly flushes. | |
| 116 */ | |
| 117 virtual void makeRenderTargetCurrent(); | |
| 118 | |
| 119 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE; | 113 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE; |
| 120 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, | 114 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, |
| 121 const SkImageFilter::Context&, | 115 const SkImageFilter::Context&, |
| 122 SkBitmap*, SkIPoint*) SK_OVERRIDE; | 116 SkBitmap*, SkIPoint*) SK_OVERRIDE; |
| 123 | 117 |
| 124 class SkAutoCachedTexture; // used internally | 118 class SkAutoCachedTexture; // used internally |
| 125 | 119 |
| 126 | 120 |
| 127 protected: | 121 protected: |
| 128 virtual bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) SK_OV
ERRIDE; | 122 virtual bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) SK_OV
ERRIDE; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 153 GrTextContext* fMainTextContext; | 147 GrTextContext* fMainTextContext; |
| 154 GrTextContext* fFallbackTextContext; | 148 GrTextContext* fFallbackTextContext; |
| 155 | 149 |
| 156 // state for our render-target | 150 // state for our render-target |
| 157 GrRenderTarget* fRenderTarget; | 151 GrRenderTarget* fRenderTarget; |
| 158 bool fNeedClear; | 152 bool fNeedClear; |
| 159 | 153 |
| 160 // remove when our clients don't rely on accessBitmap() | 154 // remove when our clients don't rely on accessBitmap() |
| 161 SkBitmap fLegacyBitmap; | 155 SkBitmap fLegacyBitmap; |
| 162 | 156 |
| 163 SkGpuDevice(GrContext*, GrRenderTarget*, unsigned flags = 0); | 157 SkGpuDevice(GrSurface*, unsigned flags = 0); |
| 164 | |
| 165 SkGpuDevice(GrContext*, GrTexture*, unsigned flags = 0); | |
| 166 | |
| 167 // called from rt and tex cons | |
| 168 void initFromRenderTarget(GrContext*, GrRenderTarget*, unsigned flags); | |
| 169 | 158 |
| 170 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE; | 159 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE; |
| 171 | 160 |
| 172 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; | 161 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; |
| 173 | 162 |
| 174 virtual SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE; | 163 virtual SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE; |
| 175 | 164 |
| 176 // sets the render target, clip, and matrix on GrContext. Use forceIdenity t
o override | 165 // sets the render target, clip, and matrix on GrContext. Use forceIdenity t
o override |
| 177 // SkDraw's matrix and draw in device coords. | 166 // SkDraw's matrix and draw in device coords. |
| 178 void prepareDraw(const SkDraw&, bool forceIdentity); | 167 void prepareDraw(const SkDraw&, bool forceIdentity); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 bool bicubic); | 205 bool bicubic); |
| 217 | 206 |
| 218 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); | 207 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); |
| 219 | 208 |
| 220 static SkPicture::AccelData::Key ComputeAccelDataKey(); | 209 static SkPicture::AccelData::Key ComputeAccelDataKey(); |
| 221 | 210 |
| 222 typedef SkBaseDevice INHERITED; | 211 typedef SkBaseDevice INHERITED; |
| 223 }; | 212 }; |
| 224 | 213 |
| 225 #endif | 214 #endif |
| OLD | NEW |