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

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

Issue 1409923003: Revert of Rewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object a say in what… (Closed) Base URL: https://skia.googlesource.com/skia.git@move
Patch Set: Created 5 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 | « src/core/SkImageCacherator.cpp ('k') | src/gpu/GrGpu.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
11 #include "GrPipelineBuilder.h" 11 #include "GrPipelineBuilder.h"
12 #include "GrProgramDesc.h" 12 #include "GrProgramDesc.h"
13 #include "GrStencil.h" 13 #include "GrStencil.h"
14 #include "GrTextureParamsAdjuster.h"
15 #include "GrXferProcessor.h" 14 #include "GrXferProcessor.h"
16 #include "SkPath.h" 15 #include "SkPath.h"
17 16
18 class GrBatchTracker; 17 class GrBatchTracker;
19 class GrContext; 18 class GrContext;
20 class GrGLContext; 19 class GrGLContext;
21 class GrIndexBuffer; 20 class GrIndexBuffer;
22 class GrNonInstancedVertices; 21 class GrNonInstancedVertices;
23 class GrPath; 22 class GrPath;
24 class GrPathRange; 23 class GrPathRange;
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 371
373 // width and height may be larger than rt (if underlying API allows it). 372 // width and height may be larger than rt (if underlying API allows it).
374 // Returns nullptr if compatible sb could not be created, otherwise the call er owns the ref on 373 // Returns nullptr if compatible sb could not be created, otherwise the call er owns the ref on
375 // the GrStencilAttachment. 374 // the GrStencilAttachment.
376 virtual GrStencilAttachment* createStencilAttachmentForRenderTarget(const Gr RenderTarget*, 375 virtual GrStencilAttachment* createStencilAttachmentForRenderTarget(const Gr RenderTarget*,
377 int widt h, 376 int widt h,
378 int heig ht) = 0; 377 int heig ht) = 0;
379 // clears target's entire stencil buffer to 0 378 // clears target's entire stencil buffer to 0
380 virtual void clearStencil(GrRenderTarget* target) = 0; 379 virtual void clearStencil(GrRenderTarget* target) = 0;
381 380
382
383 // Determines whether a copy of a texture must be made in order to be compat ible with
384 // a given GrTextureParams. If so, the width, height and filter used for the copy are
385 // output via the CopyParams.
386 bool makeCopyForTextureParams(int width, int height, const GrTextureParams&,
387 GrTextureParamsAdjuster::CopyParams*) const;
388
389 // This is only to be used in GL-specific tests. 381 // This is only to be used in GL-specific tests.
390 virtual const GrGLContext* glContextForTesting() const { return nullptr; } 382 virtual const GrGLContext* glContextForTesting() const { return nullptr; }
391 383
392 protected: 384 protected:
393 // Functions used to map clip-respecting stencil tests into normal 385 // Functions used to map clip-respecting stencil tests into normal
394 // stencil funcs supported by GPUs. 386 // stencil funcs supported by GPUs.
395 static GrStencilFunc ConvertStencilFunc(bool stencilInClip, 387 static GrStencilFunc ConvertStencilFunc(bool stencilInClip,
396 GrStencilFunc func); 388 GrStencilFunc func);
397 static void ConvertStencilFuncAndMask(GrStencilFunc func, 389 static void ConvertStencilFuncAndMask(GrStencilFunc func,
398 bool clipInStencil, 390 bool clipInStencil,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 ResetTimestamp fResetTi mestamp; 487 ResetTimestamp fResetTi mestamp;
496 uint32_t fResetBi ts; 488 uint32_t fResetBi ts;
497 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. 489 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
498 GrContext* fContext ; 490 GrContext* fContext ;
499 491
500 friend class GrPathRendering; 492 friend class GrPathRendering;
501 typedef SkRefCnt INHERITED; 493 typedef SkRefCnt INHERITED;
502 }; 494 };
503 495
504 #endif 496 #endif
OLDNEW
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698