Commit 85128724 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Revert "Revert "Use GrMockContext (rather than NullGL interface) in blink unit tests""

This reverts commit c643f1b3.

Reason for revert: Breaking build: https://ci.chromium.org/p/chromium/builders/ci/Win%20Builder/69610

Change-Id: Iab3fd9259db83438ce4353717f8459af2ef8d95c
No-Try: True
Tbr: shimazu@chromium.org
No-Tree-Checks: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547620Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#646659}
parent b3f3a362
......@@ -14,7 +14,7 @@
#include "third_party/blink/public/platform/web_graphics_context_3d_provider.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/gpu/GrContext.h"
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
#include "third_party/skia/include/gpu/mock/GrMockTypes.h"
namespace blink {
......@@ -24,8 +24,10 @@ class FakeWebGraphicsContext3DProvider : public WebGraphicsContext3DProvider {
cc::ImageDecodeCache* cache = nullptr)
: gl_(gl),
image_decode_cache_(cache ? cache : &stub_image_decode_cache_) {
sk_sp<const GrGLInterface> gl_interface(GrGLCreateNullInterface());
gr_context_ = GrContext::MakeGL(std::move(gl_interface));
GrMockOptions mockOptions;
mockOptions.fConfigOptions[kBGRA_8888_GrPixelConfig] =
mockOptions.fConfigOptions[kRGBA_8888_GrPixelConfig];
gr_context_ = GrContext::MakeMock(&mockOptions);
// enable all gpu features.
for (unsigned feature = 0; feature < gpu::NUMBER_OF_GPU_FEATURE_TYPES;
++feature) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment