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

Side by Side Diff: src/gpu/GrGpu.h

Issue 1205183002: Revert of remove workaround for dx9 angle slow rgba pixel ops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « include/gpu/gl/GrGLConfig_chrome.h ('k') | src/gpu/gl/GrGLGpu.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 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 #ifndef GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig readConfig, 141 virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig readConfig,
142 GrPixelConfig surfaceConfig) const { 142 GrPixelConfig surfaceConfig) const {
143 return readConfig; 143 return readConfig;
144 } 144 }
145 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig, 145 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig,
146 GrPixelConfig surfaceConfig ) const { 146 GrPixelConfig surfaceConfig ) const {
147 return writeConfig; 147 return writeConfig;
148 } 148 }
149 149
150 /** 150 /**
151 * Called before uploading writing pixels to a GrTexture. 151 * Called before uploading writing pixels to a GrTexture when the src pixel config doesn't
152 * match the texture's config.
152 */ 153 */
153 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig ) const = 0; 154 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig ) const = 0;
154 155
155 /** 156 /**
156 * OpenGL's readPixels returns the result bottom-to-top while the skia 157 * OpenGL's readPixels returns the result bottom-to-top while the skia
157 * API is top-to-bottom. Thus we have to do a y-axis flip. The obvious 158 * API is top-to-bottom. Thus we have to do a y-axis flip. The obvious
158 * solution is to have the subclass do the flip using either the CPU or GPU. 159 * solution is to have the subclass do the flip using either the CPU or GPU.
159 * However, the caller (GrContext) may have transformations to apply and can 160 * However, the caller (GrContext) may have transformations to apply and can
160 * simply fold in the y-flip for free. On the other hand, the subclass may 161 * simply fold in the y-flip for free. On the other hand, the subclass may
161 * be able to do it for free itself. For example, the subclass may have to 162 * be able to do it for free itself. For example, the subclass may have to
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 GrTraceMarkerSet fActiveT raceMarkers; 467 GrTraceMarkerSet fActiveT raceMarkers;
467 GrTraceMarkerSet fStoredT raceMarkers; 468 GrTraceMarkerSet fStoredT raceMarkers;
468 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. 469 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
469 GrContext* fContext ; 470 GrContext* fContext ;
470 471
471 friend class GrPathRendering; 472 friend class GrPathRendering;
472 typedef SkRefCnt INHERITED; 473 typedef SkRefCnt INHERITED;
473 }; 474 };
474 475
475 #endif 476 #endif
OLDNEW
« no previous file with comments | « include/gpu/gl/GrGLConfig_chrome.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698