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

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

Issue 506413004: Simplify SkGpuDevice construction (Closed) Base URL: https://skia.googlesource.com/skia.git@cons
Patch Set: Created 6 years, 3 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 | « no previous file | src/gpu/SkGpuDevice.cpp » ('j') | src/gpu/SkGpuDevice.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 158
167 // called from rt and tex cons 159 // called from rt and tex cons
168 void initFromRenderTarget(GrContext*, GrRenderTarget*, unsigned flags); 160 void initFromRenderTarget(GrContext*, GrRenderTarget*, unsigned flags);
169 161
170 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE; 162 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE;
171 163
172 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; 164 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE;
173 165
174 virtual SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE; 166 virtual SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE;
175 167
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 bool bicubic); 208 bool bicubic);
217 209
218 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); 210 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint);
219 211
220 static SkPicture::AccelData::Key ComputeAccelDataKey(); 212 static SkPicture::AccelData::Key ComputeAccelDataKey();
221 213
222 typedef SkBaseDevice INHERITED; 214 typedef SkBaseDevice INHERITED;
223 }; 215 };
224 216
225 #endif 217 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/SkGpuDevice.cpp » ('j') | src/gpu/SkGpuDevice.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698