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

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

Issue 709003006: cleanup friends in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup_geometry_handling
Patch Set: 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/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.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 2010 Google Inc. 3 * Copyright 2010 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 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 return buffer; 178 return buffer;
179 } 179 }
180 180
181 void GrGpu::clear(const SkIRect* rect, 181 void GrGpu::clear(const SkIRect* rect,
182 GrColor color, 182 GrColor color,
183 bool canIgnoreRect, 183 bool canIgnoreRect,
184 GrRenderTarget* renderTarget) { 184 GrRenderTarget* renderTarget) {
185 SkASSERT(renderTarget); 185 SkASSERT(renderTarget);
186 this->handleDirtyContext(); 186 this->handleDirtyContext();
187 this->onGpuClear(renderTarget, rect, color, canIgnoreRect); 187 this->onClear(renderTarget, rect, color, canIgnoreRect);
188 } 188 }
189 189
190 void GrGpu::clearStencilClip(const SkIRect& rect, 190 void GrGpu::clearStencilClip(const SkIRect& rect,
191 bool insideClip, 191 bool insideClip,
192 GrRenderTarget* renderTarget) { 192 GrRenderTarget* renderTarget) {
193 if (NULL == renderTarget) { 193 if (NULL == renderTarget) {
194 renderTarget = this->getDrawState().getRenderTarget(); 194 renderTarget = this->getDrawState().getRenderTarget();
195 } 195 }
196 if (NULL == renderTarget) { 196 if (NULL == renderTarget) {
197 SkASSERT(0); 197 SkASSERT(0);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 6, 316 6,
317 MAX_QUADS, 317 MAX_QUADS,
318 4); 318 4);
319 } 319 }
320 320
321 return fQuadIndexBuffer; 321 return fQuadIndexBuffer;
322 } 322 }
323 323
324 //////////////////////////////////////////////////////////////////////////////// 324 ////////////////////////////////////////////////////////////////////////////////
325 325
326 void GrGpu::onDraw(const GrDrawTarget::DrawInfo& info, 326 void GrGpu::draw(const GrDrawTarget::DrawInfo& info,
327 const GrClipMaskManager::ScissorState& scissorState) { 327 const GrClipMaskManager::ScissorState& scissorState) {
328 this->handleDirtyContext(); 328 this->handleDirtyContext();
329 if (!this->flushGraphicsState(PrimTypeToDrawType(info.primitiveType()), 329 if (!this->flushGraphicsState(PrimTypeToDrawType(info.primitiveType()),
330 scissorState, 330 scissorState,
331 info.getDstCopy())) { 331 info.getDstCopy())) {
332 return; 332 return;
333 } 333 }
334 this->onGpuDraw(info); 334 this->onDraw(info);
335 } 335 }
336 336
337 void GrGpu::onStencilPath(const GrPath* path, 337 void GrGpu::stencilPath(const GrPath* path,
338 const GrClipMaskManager::ScissorState& scissorState, 338 const GrClipMaskManager::ScissorState& scissorState,
339 const GrStencilSettings& stencilSettings) { 339 const GrStencilSettings& stencilSettings) {
340 this->handleDirtyContext(); 340 this->handleDirtyContext();
341 341
342 if (!this->flushGraphicsState(kStencilPath_DrawType, scissorState, NULL)) { 342 if (!this->flushGraphicsState(kStencilPath_DrawType, scissorState, NULL)) {
343 return; 343 return;
344 } 344 }
345 345
346 this->pathRendering()->stencilPath(path, stencilSettings); 346 this->pathRendering()->stencilPath(path, stencilSettings);
347 } 347 }
348 348
349 349
350 void GrGpu::onDrawPath(const GrPath* path, 350 void GrGpu::drawPath(const GrPath* path,
351 const GrClipMaskManager::ScissorState& scissorState, 351 const GrClipMaskManager::ScissorState& scissorState,
352 const GrStencilSettings& stencilSettings, 352 const GrStencilSettings& stencilSettings,
353 const GrDeviceCoordTexture* dstCopy) { 353 const GrDeviceCoordTexture* dstCopy) {
354 this->handleDirtyContext(); 354 this->handleDirtyContext();
355 355
356 if (!this->flushGraphicsState(kDrawPath_DrawType, scissorState, dstCopy)) { 356 if (!this->flushGraphicsState(kDrawPath_DrawType, scissorState, dstCopy)) {
357 return; 357 return;
358 } 358 }
359 359
360 this->pathRendering()->drawPath(path, stencilSettings); 360 this->pathRendering()->drawPath(path, stencilSettings);
361 } 361 }
362 362
363 void GrGpu::onDrawPaths(const GrPathRange* pathRange, 363 void GrGpu::drawPaths(const GrPathRange* pathRange,
364 const uint32_t indices[], 364 const uint32_t indices[],
365 int count, 365 int count,
366 const float transforms[], 366 const float transforms[],
367 GrDrawTarget::PathTransformType transformsType, 367 GrDrawTarget::PathTransformType transformsType,
368 const GrClipMaskManager::ScissorState& scissorState, 368 const GrClipMaskManager::ScissorState& scissorState,
369 const GrStencilSettings& stencilSettings, 369 const GrStencilSettings& stencilSettings,
370 const GrDeviceCoordTexture* dstCopy) { 370 const GrDeviceCoordTexture* dstCopy) {
371 this->handleDirtyContext(); 371 this->handleDirtyContext();
372 372
373 if (!this->flushGraphicsState(kDrawPaths_DrawType, scissorState, dstCopy)) { 373 if (!this->flushGraphicsState(kDrawPaths_DrawType, scissorState, dstCopy)) {
374 return; 374 return;
375 } 375 }
376 376
377 pathRange->willDrawPaths(indices, count); 377 pathRange->willDrawPaths(indices, count);
378 this->pathRendering()->drawPaths(pathRange, indices, count, transforms, tran sformsType, 378 this->pathRendering()->drawPaths(pathRange, indices, count, transforms, tran sformsType,
379 stencilSettings); 379 stencilSettings);
380 } 380 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698