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

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

Issue 648863002: Devirtualize read/write pixels on surface. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: simplify return Created 6 years, 2 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/GrContext.h ('k') | include/gpu/GrSurface.h » ('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 GrRenderTarget_DEFINED 8 #ifndef GrRenderTarget_DEFINED
9 #define GrRenderTarget_DEFINED 9 #define GrRenderTarget_DEFINED
10 10
(...skipping 25 matching lines...) Expand all
36 virtual const GrTexture* asTexture() const SK_OVERRIDE { return fTexture; } 36 virtual const GrTexture* asTexture() const SK_OVERRIDE { return fTexture; }
37 37
38 /** 38 /**
39 * @return this render target. 39 * @return this render target.
40 */ 40 */
41 virtual GrRenderTarget* asRenderTarget() SK_OVERRIDE { return this; } 41 virtual GrRenderTarget* asRenderTarget() SK_OVERRIDE { return this; }
42 virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE { 42 virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE {
43 return this; 43 return this;
44 } 44 }
45 45
46 virtual bool readPixels(int left, int top, int width, int height,
47 GrPixelConfig config,
48 void* buffer,
49 size_t rowBytes = 0,
50 uint32_t pixelOpsFlags = 0) SK_OVERRIDE;
51
52 virtual void writePixels(int left, int top, int width, int height,
53 GrPixelConfig config,
54 const void* buffer,
55 size_t rowBytes = 0,
56 uint32_t pixelOpsFlags = 0) SK_OVERRIDE;
57
58 // GrRenderTarget 46 // GrRenderTarget
59 /** 47 /**
60 * If this RT is multisampled, this is the multisample buffer 48 * If this RT is multisampled, this is the multisample buffer
61 * @return the 3D API's handle to this object (e.g. FBO ID in OpenGL) 49 * @return the 3D API's handle to this object (e.g. FBO ID in OpenGL)
62 */ 50 */
63 virtual GrBackendObject getRenderTargetHandle() const = 0; 51 virtual GrBackendObject getRenderTargetHandle() const = 0;
64 52
65 /** 53 /**
66 * If this RT is multisampled, this is the buffer it is resolved to. 54 * If this RT is multisampled, this is the buffer it is resolved to.
67 * Otherwise, same as getRenderTargetHandle(). 55 * Otherwise, same as getRenderTargetHandle().
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 156
169 GrStencilBuffer* fStencilBuffer; 157 GrStencilBuffer* fStencilBuffer;
170 GrTexture* fTexture; // not ref'ed 158 GrTexture* fTexture; // not ref'ed
171 159
172 SkIRect fResolveRect; 160 SkIRect fResolveRect;
173 161
174 typedef GrSurface INHERITED; 162 typedef GrSurface INHERITED;
175 }; 163 };
176 164
177 #endif 165 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | include/gpu/GrSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698