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

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

Issue 705593002: Refactor DrawTarget and GPU to be independent (Closed) Base URL: https://skia.googlesource.com/skia.git@early_clip
Patch Set: rebase on master Created 6 years, 1 month 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/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/gl/GrGpuGL.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrTest.h" 9 #include "GrTest.h"
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 GrPixelConfig config, 64 GrPixelConfig config,
65 size_t rowBytes) const SK_OVERRIDE { return false; } 65 size_t rowBytes) const SK_OVERRIDE { return false; }
66 virtual void buildProgramDesc(const GrOptDrawState&, 66 virtual void buildProgramDesc(const GrOptDrawState&,
67 const GrProgramDesc::DescInfo&, 67 const GrProgramDesc::DescInfo&,
68 GrGpu::DrawType, 68 GrGpu::DrawType,
69 const GrDeviceCoordTexture* dstCopy, 69 const GrDeviceCoordTexture* dstCopy,
70 GrProgramDesc* desc) SK_OVERRIDE { } 70 GrProgramDesc* desc) SK_OVERRIDE { }
71 71
72 virtual void discard(GrRenderTarget*) SK_OVERRIDE { } 72 virtual void discard(GrRenderTarget*) SK_OVERRIDE { }
73 73
74 virtual bool canCopySurface(GrSurface* dst,
75 GrSurface* src,
76 const SkIRect& srcRect,
77 const SkIPoint& dstPoint) SK_OVERRIDE { return f alse; };
78
79 virtual bool copySurface(GrSurface* dst,
80 GrSurface* src,
81 const SkIRect& srcRect,
82 const SkIPoint& dstPoint) SK_OVERRIDE { return fals e; };
83
74 private: 84 private:
75 virtual void onResetContext(uint32_t resetBits) { }; 85 virtual void onResetContext(uint32_t resetBits) { };
76 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, 86 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc,
77 const void* srcData, 87 const void* srcData,
78 size_t rowBytes) SK_OVERRIDE { 88 size_t rowBytes) SK_OVERRIDE {
79 return NULL; 89 return NULL;
80 } 90 }
81 91
82 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, 92 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc,
83 const void* srcData) SK_OVERRI DE { 93 const void* srcData) SK_OVERRI DE {
(...skipping 17 matching lines...) Expand all
101 return NULL; 111 return NULL;
102 } 112 }
103 113
104 virtual void onGpuClear(GrRenderTarget*, const SkIRect* rect, GrColor color, 114 virtual void onGpuClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
105 bool canIgnoreRect) SK_OVERRIDE { } 115 bool canIgnoreRect) SK_OVERRIDE { }
106 116
107 virtual void onClearStencilClip(GrRenderTarget*, 117 virtual void onClearStencilClip(GrRenderTarget*,
108 const SkIRect& rect, 118 const SkIRect& rect,
109 bool insideClip) SK_OVERRIDE { } 119 bool insideClip) SK_OVERRIDE { }
110 120
111 virtual void onGpuDraw(const DrawInfo&) SK_ OVERRIDE { } 121 virtual void onGpuDraw(const GrDrawTarget::DrawInfo&) SK_OVERRIDE { }
112 virtual bool onReadPixels(GrRenderTarget* target, 122 virtual bool onReadPixels(GrRenderTarget* target,
113 int left, int top, int width, int height, 123 int left, int top, int width, int height,
114 GrPixelConfig, 124 GrPixelConfig,
115 void* buffer, 125 void* buffer,
116 size_t rowBytes) SK_OVERRIDE { 126 size_t rowBytes) SK_OVERRIDE {
117 return false; 127 return false;
118 } 128 }
119 129
120 virtual bool onWriteTexturePixels(GrTexture* texture, 130 virtual bool onWriteTexturePixels(GrTexture* texture,
121 int left, int top, int width, int height, 131 int left, int top, int width, int height,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // these objects are required for any of tests that use this context. TODO: make stop allocating 178 // these objects are required for any of tests that use this context. TODO: make stop allocating
169 // resources in the buffer pools. 179 // resources in the buffer pools.
170 SkDELETE(fDrawBuffer); 180 SkDELETE(fDrawBuffer);
171 SkDELETE(fDrawBufferVBAllocPool); 181 SkDELETE(fDrawBufferVBAllocPool);
172 SkDELETE(fDrawBufferIBAllocPool); 182 SkDELETE(fDrawBufferIBAllocPool);
173 183
174 fDrawBuffer = NULL; 184 fDrawBuffer = NULL;
175 fDrawBufferVBAllocPool = NULL; 185 fDrawBufferVBAllocPool = NULL;
176 fDrawBufferIBAllocPool = NULL; 186 fDrawBufferIBAllocPool = NULL;
177 } 187 }
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698