[graphite] Remove usage of CreateKey from the CommandBufferTest

Bug: skia:12701
Change-Id: Ibaeedcbf478546f2942df95d362bee8632ba0ded
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548419
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tests/graphite/CommandBufferTest.cpp b/tests/graphite/CommandBufferTest.cpp
index 2eed37b..3bfa357 100644
--- a/tests/graphite/CommandBufferTest.cpp
+++ b/tests/graphite/CommandBufferTest.cpp
@@ -7,6 +7,7 @@
 
 #include "tests/Test.h"
 
+#include "include/core/SkBlender.h"
 #include "include/core/SkCombinationBuilder.h"
 #include "include/gpu/graphite/Context.h"
 #include "include/gpu/graphite/Recorder.h"
@@ -24,6 +25,7 @@
 #include "src/gpu/graphite/GlobalCache.h"
 #include "src/gpu/graphite/Gpu.h"
 #include "src/gpu/graphite/GraphicsPipeline.h"
+#include "src/gpu/graphite/PaintParams.h"
 #include "src/gpu/graphite/RecorderPriv.h"
 #include "src/gpu/graphite/Renderer.h"
 #include "src/gpu/graphite/ResourceProvider.h"
@@ -254,10 +256,13 @@
 
         SkPaintParamsKeyBuilder builder(dict, SkBackend::kGraphite);
 
-        uniqueID = CreateKey(keyContext,
-                             &builder,
-                             SkShaderType::kSolidColor,
-                             SkBlendMode::kSrc);
+        PaintParams pp { SkColors::kRed, nullptr, nullptr };
+
+        pp.toKey(keyContext, &builder, nullptr);
+
+        auto entry = dict->findOrCreate(&builder);
+
+        uniqueID = entry->uniqueID();
     }
 
     auto target = sk_sp<TextureProxy>(new TextureProxy(textureSize, textureInfo, SkBudgeted::kYes));