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

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 577023002: hide deviceproperties, prepare the way for surfaceprops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix SkTrackDevice.h 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 | « src/core/SkDraw.cpp ('k') | no next file » | 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 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 "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 9
10 #include "effects/GrBicubicEffect.h" 10 #include "effects/GrBicubicEffect.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 fNeedClear = flags & kNeedClear_Flag; 150 fNeedClear = flags & kNeedClear_Flag;
151 151
152 fRenderTarget = SkRef(surface->asRenderTarget()); 152 fRenderTarget = SkRef(surface->asRenderTarget());
153 153
154 SkPixelRef* pr = SkNEW_ARGS(SkGrPixelRef, 154 SkPixelRef* pr = SkNEW_ARGS(SkGrPixelRef,
155 (surface->info(), surface, SkToBool(flags & kCac hed_Flag))); 155 (surface->info(), surface, SkToBool(flags & kCac hed_Flag)));
156 fLegacyBitmap.setInfo(surface->info()); 156 fLegacyBitmap.setInfo(surface->info());
157 fLegacyBitmap.setPixelRef(pr)->unref(); 157 fLegacyBitmap.setPixelRef(pr)->unref();
158 158
159 bool useDFFonts = !!(flags & kDFFonts_Flag); 159 bool useDFFonts = !!(flags & kDFFonts_Flag);
160 fMainTextContext = fContext->createTextContext(fRenderTarget, fLeakyProperti es, useDFFonts); 160 fMainTextContext = fContext->createTextContext(fRenderTarget, this->getLeaky Properties(), useDFFonts);
161 fFallbackTextContext = SkNEW_ARGS(GrBitmapTextContext, (fContext, fLeakyProp erties)); 161 fFallbackTextContext = SkNEW_ARGS(GrBitmapTextContext, (fContext, this->getL eakyProperties()));
162 } 162 }
163 163
164 SkGpuDevice* SkGpuDevice::Create(GrContext* context, const SkImageInfo& origInfo , 164 SkGpuDevice* SkGpuDevice::Create(GrContext* context, const SkImageInfo& origInfo ,
165 int sampleCount) { 165 int sampleCount) {
166 if (kUnknown_SkColorType == origInfo.colorType() || 166 if (kUnknown_SkColorType == origInfo.colorType() ||
167 origInfo.width() < 0 || origInfo.height() < 0) { 167 origInfo.width() < 0 || origInfo.height() < 0) {
168 return NULL; 168 return NULL;
169 } 169 }
170 170
171 SkColorType ct = origInfo.colorType(); 171 SkColorType ct = origInfo.colorType();
(...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 GrLayerHoister::UnlockLayers(fContext->getLayerCache(), picture); 1942 GrLayerHoister::UnlockLayers(fContext->getLayerCache(), picture);
1943 1943
1944 return true; 1944 return true;
1945 } 1945 }
1946 1946
1947 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1947 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1948 // We always return a transient cache, so it is freed after each 1948 // We always return a transient cache, so it is freed after each
1949 // filter traversal. 1949 // filter traversal.
1950 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 1950 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
1951 } 1951 }
OLDNEW
« no previous file with comments | « src/core/SkDraw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698