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

Unified Diff: include/gpu/GrEffectUnitTest.h

Issue 12965018: Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: include/gpu/GrEffectUnitTest.h
===================================================================
--- include/gpu/GrEffectUnitTest.h (revision 8365)
+++ include/gpu/GrEffectUnitTest.h (working copy)
@@ -8,11 +8,12 @@
#ifndef GrEffectUnitTest_DEFINED
#define GrEffectUnitTest_DEFINED
+#include "GrNoncopyable.h"
#include "SkRandom.h"
-#include "GrNoncopyable.h"
#include "SkTArray.h"
class SkMatrix;
+class GrDrawTargetCaps;
namespace GrEffectUnitTest {
// Used to access the dummy textures in TestCreate procs.
@@ -37,7 +38,10 @@
class GrEffectTestFactory : GrNoncopyable {
public:
- typedef GrEffectRef* (*CreateProc)(SkMWCRandom*, GrContext*, GrTexture* dummyTextures[]);
+ typedef GrEffectRef* (*CreateProc)(SkMWCRandom*,
+ GrContext*,
+ const GrDrawTargetCaps& caps,
+ GrTexture* dummyTextures[]);
GrEffectTestFactory(CreateProc createProc) {
fCreateProc = createProc;
@@ -46,10 +50,11 @@
static GrEffectRef* CreateStage(SkMWCRandom* random,
GrContext* context,
+ const GrDrawTargetCaps& caps,
GrTexture* dummyTextures[]) {
uint32_t idx = random->nextRangeU(0, GetFactories()->count() - 1);
GrEffectTestFactory* factory = (*GetFactories())[idx];
- return factory->fCreateProc(random, context, dummyTextures);
+ return factory->fCreateProc(random, context, caps, dummyTextures);
}
private:
@@ -62,11 +67,17 @@
*/
robertphillips 2013/03/25 18:11:36 line up trailing '\'s?
bsalomon 2013/03/25 18:20:14 Done.
#define GR_DECLARE_EFFECT_TEST \
static GrEffectTestFactory gTestFactory; \
- static GrEffectRef* TestCreate(SkMWCRandom*, GrContext*, GrTexture* dummyTextures[2])
+ static GrEffectRef* TestCreate(SkMWCRandom*, \
+ GrContext*, \
+ const GrDrawTargetCaps&, \
+ GrTexture* dummyTextures[2])
/** GrEffect subclasses should insert this macro in their implementation file. They must then
* also implement this static function:
- * GrEffect* TestCreate(SkMWCRandom*, GrContext*, GrTexture* dummyTextures[2]);
+ * GrEffect* TestCreate(SkMWCRandom*,
+ * GrContext*,
+ * const GrDrawTargetCaps&,
+ * GrTexture* dummyTextures[2]);
* dummyTextures[] are valid textures that can optionally be used to construct GrTextureAccesses.
* The first texture has config kSkia8888_GrPixelConfig and the second has
* kAlpha_8_GrPixelConfig. TestCreate functions are also free to create additional textures using
@@ -79,8 +90,11 @@
// The unit test relies on static initializers. Just declare the TestCreate function so that
// its definitions will compile.
robertphillips 2013/03/25 18:11:36 same here?
bsalomon 2013/03/25 18:20:14 Done.
-#define GR_DECLARE_EFFECT_TEST \
- static GrEffectRef* TestCreate(SkMWCRandom*, GrContext*, GrTexture* dummyTextures[2])
+#define GR_DECLARE_EFFECT_TEST \
+ static GrEffectRef* TestCreate(SkMWCRandom*, \
+ GrContext*, \
+ const GrDrawTargetCaps&, \
+ GrTexture* dummyTextures[2])
#define GR_DEFINE_EFFECT_TEST(X)
#endif // !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
« no previous file with comments | « gyp/gpu.gypi ('k') | src/effects/SkBicubicImageFilter.cpp » ('j') | src/gpu/GrDrawTargetCaps.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698