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

Side by Side Diff: tools/PictureRenderer.h

Issue 117583002: Update bench pictures to time image decode & upload costs (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fixed comment Created 7 years 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/PictureBenchmark.cpp ('k') | tools/PictureRenderer.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 #ifndef PictureRenderer_DEFINED 8 #ifndef PictureRenderer_DEFINED
9 #define PictureRenderer_DEFINED 9 #define PictureRenderer_DEFINED
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 virtual TiledPictureRenderer* getTiledRenderer() { return NULL; } 141 virtual TiledPictureRenderer* getTiledRenderer() { return NULL; }
142 142
143 /** 143 /**
144 * Resets the GPU's state. Does nothing if the backing is raster. For a GPU renderer, calls 144 * Resets the GPU's state. Does nothing if the backing is raster. For a GPU renderer, calls
145 * flush, and calls finish if callFinish is true. 145 * flush, and calls finish if callFinish is true.
146 * @param callFinish Whether to call finish. 146 * @param callFinish Whether to call finish.
147 */ 147 */
148 void resetState(bool callFinish); 148 void resetState(bool callFinish);
149 149
150 /** 150 /**
151 * Remove all decoded textures from the CPU caches and all uploaded textures
152 * from the GPU.
153 */
154 void purgeTextures();
155
156 /**
151 * Set the backend type. Returns true on success and false on failure. 157 * Set the backend type. Returns true on success and false on failure.
152 */ 158 */
153 bool setDeviceType(SkDeviceTypes deviceType) { 159 bool setDeviceType(SkDeviceTypes deviceType) {
154 fDeviceType = deviceType; 160 fDeviceType = deviceType;
155 #if SK_SUPPORT_GPU 161 #if SK_SUPPORT_GPU
156 // In case this function is called more than once 162 // In case this function is called more than once
157 SkSafeUnref(fGrContext); 163 SkSafeUnref(fGrContext);
158 fGrContext = NULL; 164 fGrContext = NULL;
159 // Set to Native so it will have an initial value. 165 // Set to Native so it will have an initial value.
160 GrContextFactory::GLContextType glContextType = GrContextFactory::kNativ e_GLContextType; 166 GrContextFactory::GLContextType glContextType = GrContextFactory::kNativ e_GLContextType;
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 583
578 typedef PictureRenderer INHERITED; 584 typedef PictureRenderer INHERITED;
579 }; 585 };
580 586
581 extern PictureRenderer* CreateGatherPixelRefsRenderer(); 587 extern PictureRenderer* CreateGatherPixelRefsRenderer();
582 extern PictureRenderer* CreatePictureCloneRenderer(); 588 extern PictureRenderer* CreatePictureCloneRenderer();
583 589
584 } 590 }
585 591
586 #endif // PictureRenderer_DEFINED 592 #endif // PictureRenderer_DEFINED
OLDNEW
« no previous file with comments | « tools/PictureBenchmark.cpp ('k') | tools/PictureRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698