Use new GrDirectContext factories instead of deprecated GrContext ones
GrContext is going away (to be replaced with a GrDirectContext/
GrRecordingContext pair). This transitions Chromium over to using
the GrDirectContext factories to create the direct contexts it uses.
Skia's GrContext, in the past, was a catch-all location that stored
information for Skia's GPU backend (e.g., resource caches) and provided
services that required access to the GPU (e.g., creation of backend
textures, flushing, etc.). In the new world, most of these capabilities
are being moved to the GrDirectContext - which has _direct_ access
to the GPU. The GrRecordingContext is a weaker context that lacks
access to the GPU and thus can't provide some of the services of the
old GrContext. The GrRecordingContext gains relevance when DDL
recording. In that mode, both clients and Skia's GPU backend require
some of the services of a context (e.g., memory storage for Skia's
internal operations, access to the GPU capability information and
some thread safe caches).
Here is my thinking wrt reviewers (lines w/ '--' are done/covered):
alcooper chrome/browser/vr
-- blundell@ services
-- chcunningham@ media
chrishtr@ third_party/blink
-- dalecurtis@ media
-- dcastagna components/exo
-- fmalita@ skia
-- jam@ content services
-- jochen@ content third_party/blink
oshima@ components/exo
-- penghuang@ gpu
-- rjkroege@ ui/ozone
-- spang@ ui/ozone
-- vasilyt@ android_webview/browser
-- vmpstr@ cc/layers components/viz
-- vollick@ ui/compositor
Change-Id: I70d16e2d98cfda8d5f9b6f2492b3292500df4471
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2297920
Commit-Queue: Robert Phillips <[email protected]>
Reviewed-by: Alexander Cooper <[email protected]>
Reviewed-by: Ian Vollick <[email protected]>
Reviewed-by: Chrome Cunningham <[email protected]>
Reviewed-by: Daniele Castagna <[email protected]>
Reviewed-by: Jochen Eisinger <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Dale Curtis <[email protected]>
Reviewed-by: Michael Spang <[email protected]>
Reviewed-by: Robert Kroeger <[email protected]>
Reviewed-by: vmpstr <[email protected]>
Reviewed-by: Peng Huang <[email protected]>
Reviewed-by: Vasiliy Telezhnikov <[email protected]>
Reviewed-by: Florin Malita <[email protected]>
Cr-Commit-Position: refs/heads/master@{#792721}
diff --git a/chrome/browser/vr/cmd_buffer_surface_provider.cc b/chrome/browser/vr/cmd_buffer_surface_provider.cc
index 81a2a3f2..e4a0ec9a 100644
--- a/chrome/browser/vr/cmd_buffer_surface_provider.cc
+++ b/chrome/browser/vr/cmd_buffer_surface_provider.cc
@@ -11,7 +11,7 @@
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/gpu/GrBackendSurface.h"
-#include "third_party/skia/include/gpu/GrContext.h"
+#include "third_party/skia/include/gpu/GrDirectContext.h"
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
#include "ui/gfx/geometry/size.h"
@@ -24,7 +24,7 @@
sk_sp<const GrGLInterface> gr_interface =
skia_bindings::CreateGLES2InterfaceBindings(gles2_implementation,
gles2_implementation);
- gr_context_ = GrContext::MakeGL(std::move(gr_interface));
+ gr_context_ = GrDirectContext::MakeGL(std::move(gr_interface));
DCHECK(gr_context_);
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &main_fbo_);
}