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

Side by Side Diff: tools/PictureRenderer.cpp

Issue 14544007: Add msaa configs to bench_pictures (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove enum Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « tools/PictureRenderer.h ('k') | tools/PictureRenderingFlags.cpp » ('j') | 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 2012 Google Inc. 2 * Copyright 2012 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 "PictureRenderer.h" 8 #include "PictureRenderer.h"
9 #include "picture_utils.h" 9 #include "picture_utils.h"
10 #include "SamplePipeControllers.h" 10 #include "SamplePipeControllers.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 #endif 113 #endif
114 case kGPU_DeviceType: { 114 case kGPU_DeviceType: {
115 SkAutoTUnref<GrSurface> target; 115 SkAutoTUnref<GrSurface> target;
116 if (fGrContext) { 116 if (fGrContext) {
117 // create a render target to back the device 117 // create a render target to back the device
118 GrTextureDesc desc; 118 GrTextureDesc desc;
119 desc.fConfig = kSkia8888_GrPixelConfig; 119 desc.fConfig = kSkia8888_GrPixelConfig;
120 desc.fFlags = kRenderTarget_GrTextureFlagBit; 120 desc.fFlags = kRenderTarget_GrTextureFlagBit;
121 desc.fWidth = width; 121 desc.fWidth = width;
122 desc.fHeight = height; 122 desc.fHeight = height;
123 desc.fSampleCnt = 0; 123 desc.fSampleCnt = fSampleCount;
124 target.reset(fGrContext->createUncachedTexture(desc, NULL, 0)); 124 target.reset(fGrContext->createUncachedTexture(desc, NULL, 0));
125 } 125 }
126 if (NULL == target.get()) { 126 if (NULL == target.get()) {
127 SkASSERT(0); 127 SkASSERT(0);
128 return NULL; 128 return NULL;
129 } 129 }
130 130
131 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(target)); 131 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(target));
132 canvas = SkNEW_ARGS(SkCanvas, (device.get())); 132 canvas = SkNEW_ARGS(SkCanvas, (device.get()));
133 break; 133 break;
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 virtual SkString getConfigNameInternal() SK_OVERRIDE { 842 virtual SkString getConfigNameInternal() SK_OVERRIDE {
843 return SkString("picture_clone"); 843 return SkString("picture_clone");
844 } 844 }
845 }; 845 };
846 846
847 PictureRenderer* CreatePictureCloneRenderer() { 847 PictureRenderer* CreatePictureCloneRenderer() {
848 return SkNEW(PictureCloneRenderer); 848 return SkNEW(PictureCloneRenderer);
849 } 849 }
850 850
851 } // namespace sk_tools 851 } // namespace sk_tools
OLDNEW
« no previous file with comments | « tools/PictureRenderer.h ('k') | tools/PictureRenderingFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698