summaryrefslogtreecommitdiffstats
path: root/chromium/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party')
-rw-r--r--chromium/third_party/blink/renderer/core/editing/frame_selection.cc7
-rw-r--r--chromium/third_party/blink/renderer/core/exported/web_element.cc7
-rw-r--r--chromium/third_party/blink/renderer/core/frame/history.cc25
-rw-r--r--chromium/third_party/blink/renderer/core/frame/local_frame.cc4
-rw-r--r--chromium/third_party/blink/renderer/core/html/media/html_media_element.cc2
-rw-r--r--chromium/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.cc7
-rw-r--r--chromium/third_party/blink/renderer/core/paint/box_model_object_painter.cc15
-rw-r--r--chromium/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc5
-rw-r--r--chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.cc16
-rw-r--r--chromium/third_party/blink/renderer/core/paint/paint_layer.h2
-rw-r--r--chromium/third_party/blink/renderer/core/paint/paint_layer_stacking_node.cc2
-rw-r--r--chromium/third_party/blink/renderer/core/style/computed_style.cc33
-rw-r--r--chromium/third_party/blink/renderer/core/workers/worker_global_scope.h2
-rw-r--r--chromium/third_party/blink/renderer/modules/mediasource/media_source.h2
-rw-r--r--chromium/third_party/blink/renderer/modules/service_worker/navigator_service_worker.cc3
-rw-r--r--chromium/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc62
-rw-r--r--chromium/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h7
-rw-r--r--chromium/third_party/blink/renderer/platform/text/character.h12
-rw-r--r--chromium/third_party/cros_system_api/dbus/authpolicy/active_directory_info.proto4
-rw-r--r--chromium/third_party/cros_system_api/dbus/login_manager/arc.proto2
-rw-r--r--chromium/third_party/cros_system_api/dbus/login_manager/dbus-constants.h2
-rw-r--r--chromium/third_party/cros_system_api/dbus/permission_broker/dbus-constants.h1
-rw-r--r--chromium/third_party/cros_system_api/dbus/seneschal/dbus-constants.h24
-rw-r--r--chromium/third_party/cros_system_api/dbus/seneschal/service.proto121
-rw-r--r--chromium/third_party/cros_system_api/dbus/service_constants.h10
-rw-r--r--chromium/third_party/cros_system_api/dbus/vm_cicerone/cicerone_service.proto3
-rw-r--r--chromium/third_party/cros_system_api/dbus/vm_concierge/service.proto23
-rw-r--r--chromium/third_party/cros_system_api/system_api.gyp23
-rw-r--r--chromium/third_party/cros_system_api/system_api.pc2
-rw-r--r--chromium/third_party/fontconfig/README.chromium2
-rw-r--r--chromium/third_party/fontconfig/include/config.h8
-rw-r--r--chromium/third_party/fontconfig/include/src/fcalias.h2
-rw-r--r--chromium/third_party/fontconfig/include/src/fcaliastail.h2
-rw-r--r--chromium/third_party/fontconfig/include/src/fcstdint.h4
-rw-r--r--chromium/third_party/fontconfig/src/.gitlab-ci.yml53
-rw-r--r--chromium/third_party/fontconfig/src/README84
-rw-r--r--chromium/third_party/fontconfig/src/configure.ac8
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcstring.fncs12
-rw-r--r--chromium/third_party/fontconfig/src/fontconfig/fontconfig.h6
-rw-r--r--chromium/third_party/fontconfig/src/src/Makefile.am2
-rw-r--r--chromium/third_party/fontconfig/src/src/fccache.c10
-rw-r--r--chromium/third_party/fontconfig/src/src/fccfg.c48
-rw-r--r--chromium/third_party/fontconfig/src/src/fcfreetype.c2
-rw-r--r--chromium/third_party/fontconfig/src/src/fcint.h4
-rw-r--r--chromium/third_party/fontconfig/src/src/fclist.c3
-rw-r--r--chromium/third_party/fontconfig/src/src/fcmatch.c13
-rw-r--r--chromium/third_party/fontconfig/src/src/fcname.c4
-rw-r--r--chromium/third_party/fontconfig/src/src/fcptrlist.c2
-rw-r--r--chromium/third_party/fontconfig/src/src/fcstat.c9
-rw-r--r--chromium/third_party/fontconfig/src/src/fcstr.c4
-rw-r--r--chromium/third_party/fontconfig/src/src/fcxml.c13
-rw-r--r--chromium/third_party/icu/BUILD.gn2
-rw-r--r--chromium/third_party/icu/README.chromium4
-rw-r--r--chromium/third_party/icu/cast/icudtl.datbin4883232 -> 4883232 bytes
-rwxr-xr-xchromium/third_party/icu/cast/patch_locale.sh9
-rw-r--r--chromium/third_party/icu/common/icudtb.datbin10218000 -> 10218000 bytes
-rw-r--r--chromium/third_party/icu/common/icudtl.datbin10218000 -> 10218000 bytes
-rw-r--r--chromium/third_party/icu/flutter/flutter-removed-resources.txt427
-rw-r--r--chromium/third_party/icu/flutter/icudtl.datbin0 -> 1255200 bytes
-rwxr-xr-xchromium/third_party/icu/scripts/copy_data.sh18
-rwxr-xr-xchromium/third_party/icu/scripts/make_data_all.sh1
-rw-r--r--chromium/third_party/skia/include/gpu/gl/GrGLExtensions.h8
-rw-r--r--chromium/third_party/skia/include/gpu/gl/GrGLFunctions.h480
-rw-r--r--chromium/third_party/skia/include/gpu/gl/GrGLInterface.h424
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLAssembleInterface.cpp32
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLExtensions.cpp8
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLTestInterface.cpp10
-rw-r--r--chromium/third_party/skia/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp2
68 files changed, 1564 insertions, 584 deletions
diff --git a/chromium/third_party/blink/renderer/core/editing/frame_selection.cc b/chromium/third_party/blink/renderer/core/editing/frame_selection.cc
index d88aac9ceac..e2971565e29 100644
--- a/chromium/third_party/blink/renderer/core/editing/frame_selection.cc
+++ b/chromium/third_party/blink/renderer/core/editing/frame_selection.cc
@@ -1095,6 +1095,13 @@ bool FrameSelection::SelectWordAroundCaret() {
// for avoiding unnecessary canonicalization.
VisiblePosition start = StartOfWord(position, word_side);
VisiblePosition end = EndOfWord(position, word_side);
+
+ // TODO(editing-dev): |StartOfWord()| and |EndOfWord()| should not make null
+ // for non-null parameter.
+ // See http://crbug.com/872443
+ if (start.DeepEquivalent().IsNull() || end.DeepEquivalent().IsNull())
+ continue;
+
String text =
PlainText(EphemeralRange(start.DeepEquivalent(), end.DeepEquivalent()));
if (!text.IsEmpty() && !IsSeparator(text.CharacterStartingAt(0))) {
diff --git a/chromium/third_party/blink/renderer/core/exported/web_element.cc b/chromium/third_party/blink/renderer/core/exported/web_element.cc
index e9f1304a577..24931b74d5c 100644
--- a/chromium/third_party/blink/renderer/core/exported/web_element.cc
+++ b/chromium/third_party/blink/renderer/core/exported/web_element.cc
@@ -155,9 +155,10 @@ WebRect WebElement::BoundsInViewport() const {
SkBitmap WebElement::ImageContents() {
if (IsNull())
return {};
-
- return Unwrap<Element>()->ImageContents()->AsSkBitmapForCurrentFrame(
- kRespectImageOrientation);
+ Image* image = Unwrap<Element>()->ImageContents();
+ if (!image)
+ return {};
+ return image->AsSkBitmapForCurrentFrame(kRespectImageOrientation);
}
void WebElement::RequestFullscreen() {
diff --git a/chromium/third_party/blink/renderer/core/frame/history.cc b/chromium/third_party/blink/renderer/core/frame/history.cc
index 1b4b8aef02c..6c85cf05ceb 100644
--- a/chromium/third_party/blink/renderer/core/frame/history.cc
+++ b/chromium/third_party/blink/renderer/core/frame/history.cc
@@ -89,21 +89,30 @@ SerializedScriptValue* History::state(ExceptionState& exception_state) {
}
SerializedScriptValue* History::StateInternal() const {
- if (!GetFrame())
+ LocalFrame* frame = GetFrame();
+ if (!frame)
return nullptr;
- if (HistoryItem* history_item =
- GetFrame()->Loader().GetDocumentLoader()->GetHistoryItem()) {
- return history_item->StateObject();
- }
+ // TODO(kouhei, dcheng): The DocumentLoader null check should be unnecessary.
+ // Investigate and see if it can be removed.
+ DocumentLoader* document_loader = frame->Loader().GetDocumentLoader();
+ if (!document_loader)
+ return nullptr;
- return nullptr;
+ HistoryItem* history_item = document_loader->GetHistoryItem();
+ if (!history_item)
+ return nullptr;
+
+ return history_item->StateObject();
}
void History::setScrollRestoration(const String& value,
ExceptionState& exception_state) {
DCHECK(value == "manual" || value == "auto");
- if (!GetFrame() || !GetFrame()->Client()) {
+ // TODO(kouhei, dcheng): The DocumentLoader null check should be unnecessary.
+ // Investigate and see if it can be removed.
+ if (!GetFrame() || !GetFrame()->Client() ||
+ !GetFrame()->Loader().GetDocumentLoader()) {
exception_state.ThrowSecurityError(
"May not use a History object associated with a Document that is not "
"fully active");
@@ -140,6 +149,8 @@ HistoryScrollRestorationType History::ScrollRestorationInternal() const {
if (!frame)
return default_type;
+ // TODO(kouhei, dcheng): The DocumentLoader null check should be unnecessary.
+ // Investigate and see if it can be removed.
DocumentLoader* document_loader = frame->Loader().GetDocumentLoader();
if (!document_loader)
return default_type;
diff --git a/chromium/third_party/blink/renderer/core/frame/local_frame.cc b/chromium/third_party/blink/renderer/core/frame/local_frame.cc
index 464a41e6f27..52810bba03b 100644
--- a/chromium/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/chromium/third_party/blink/renderer/core/frame/local_frame.cc
@@ -1356,8 +1356,10 @@ void LocalFrame::SetViewportIntersectionFromParent(
const IntRect& viewport_intersection) {
if (remote_viewport_intersection_ != viewport_intersection) {
remote_viewport_intersection_ = viewport_intersection;
- if (View())
+ if (View()) {
+ View()->SetNeedsIntersectionObservation(LocalFrameView::kRequired);
View()->ScheduleAnimation();
+ }
}
}
diff --git a/chromium/third_party/blink/renderer/core/html/media/html_media_element.cc b/chromium/third_party/blink/renderer/core/html/media/html_media_element.cc
index 0ff8d187c58..a7cec27411c 100644
--- a/chromium/third_party/blink/renderer/core/html/media/html_media_element.cc
+++ b/chromium/third_party/blink/renderer/core/html/media/html_media_element.cc
@@ -539,8 +539,6 @@ HTMLMediaElement::~HTMLMediaElement() {
}
void HTMLMediaElement::Dispose() {
- CloseMediaSource();
-
// Destroying the player may cause a resource load to be canceled,
// which could result in LocalDOMWindow::dispatchWindowLoadEvent() being
// called via ResourceFetch::didLoadResource(), then
diff --git a/chromium/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.cc b/chromium/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.cc
index 191e2407ff1..c4aa4af1285 100644
--- a/chromium/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.cc
+++ b/chromium/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.cc
@@ -661,7 +661,10 @@ static void ProjectRectsToGraphicsLayerSpaceRecursive(
const PaintLayer* composited_layer =
layer_iter->key
->EnclosingLayerForPaintInvalidationCrossingFrameBoundaries();
- DCHECK(composited_layer);
+ // https://crbug.com/751768. |composited_layer| can be null, don't just
+ // DCHECK it.
+ if (!composited_layer)
+ return;
// Find the appropriate GraphicsLayer for the composited Layer.
GraphicsLayer* graphics_layer =
@@ -875,6 +878,8 @@ void ScrollingCoordinator::SetTouchEventTargetRects(
const PaintLayer* composited_layer =
layer_rect.key
->EnclosingLayerForPaintInvalidationCrossingFrameBoundaries();
+ // https://crbug.com/751768. |composited_layer| can be null, don't just
+ // DCHECK it.
if (!composited_layer)
continue;
frame->View()->GetScrollingContext()->GetLayersWithTouchRects()->insert(
diff --git a/chromium/third_party/blink/renderer/core/paint/box_model_object_painter.cc b/chromium/third_party/blink/renderer/core/paint/box_model_object_painter.cc
index 7cfd64eec43..526970b70ad 100644
--- a/chromium/third_party/blink/renderer/core/paint/box_model_object_painter.cc
+++ b/chromium/third_party/blink/renderer/core/paint/box_model_object_painter.cc
@@ -4,10 +4,12 @@
#include "third_party/blink/renderer/core/paint/box_model_object_painter.h"
+#include "third_party/blink/renderer/core/layout/layout_block_flow.h"
#include "third_party/blink/renderer/core/layout/layout_box_model_object.h"
-#include "third_party/blink/renderer/core/layout/layout_object.h"
+#include "third_party/blink/renderer/core/layout/layout_inline.h"
#include "third_party/blink/renderer/core/layout/line/root_inline_box.h"
#include "third_party/blink/renderer/core/paint/background_image_geometry.h"
+#include "third_party/blink/renderer/core/paint/line_box_list_painter.h"
#include "third_party/blink/renderer/core/paint/object_painter.h"
#include "third_party/blink/renderer/core/paint/paint_info.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
@@ -84,9 +86,14 @@ void BoxModelObjectPainter::PaintTextClipMask(GraphicsContext& context,
flow_box_->Paint(paint_info, paint_offset - local_offset, root.LineTop(),
root.LineBottom());
} else {
- // FIXME: this should only have an effect for the line box list within
- // |box_model_|. Change this to create a LineBoxListPainter directly.
- box_model_.Paint(paint_info);
+ const LineBoxList* line_boxes = nullptr;
+ if (box_model_.IsLayoutBlockFlow())
+ line_boxes = &ToLayoutBlockFlow(box_model_).LineBoxes();
+ else if (box_model_.IsLayoutInline())
+ line_boxes = ToLayoutInline(box_model_).LineBoxes();
+ if (!line_boxes)
+ return;
+ LineBoxListPainter(*line_boxes).Paint(box_model_, paint_info, paint_offset);
}
}
diff --git a/chromium/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc b/chromium/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc
index c900e894b44..5f13a443aff 100644
--- a/chromium/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc
+++ b/chromium/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc
@@ -1447,6 +1447,11 @@ void CompositedLayerMapping::UpdateOverflowControlsHostLayerGeometry(
LayoutPoint host_layer_position;
if (NeedsToReparentOverflowControls()) {
+ // This should never be true, but for some reason it is.
+ // See https://crbug.com/880930.
+ if (!compositing_stacking_context)
+ return;
+
CompositedLayerMapping* stacking_clm =
compositing_stacking_context->GetCompositedLayerMapping();
DCHECK(stacking_clm);
diff --git a/chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.cc b/chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.cc
index e50a69a5f2e..9b87b5cd9eb 100644
--- a/chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.cc
+++ b/chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.cc
@@ -403,6 +403,16 @@ GraphicsLayer* PaintLayerCompositor::ParentForContentLayers(
return GetVisualViewport().ScrollLayer();
}
+#if DCHECK_IS_ON()
+static void AssertWholeTreeNotComposited(const PaintLayer& paint_layer) {
+ DCHECK(paint_layer.GetCompositingState() == kNotComposited);
+ for (PaintLayer* child = paint_layer.FirstChild(); child;
+ child = child->NextSibling()) {
+ AssertWholeTreeNotComposited(*child);
+ }
+}
+#endif
+
void PaintLayerCompositor::UpdateIfNeeded(
DocumentLifecycle::LifecycleState target_state,
CompositingReasonsStats& compositing_reasons_stats) {
@@ -500,6 +510,12 @@ void PaintLayerCompositor::UpdateIfNeeded(
->Parent();
}
+#if DCHECK_IS_ON()
+ if (update_root->GetCompositingState() != kPaintsIntoOwnBacking) {
+ AssertWholeTreeNotComposited(*update_root);
+ }
+#endif
+
GraphicsLayerUpdater updater;
updater.Update(*update_root, layers_needing_paint_invalidation);
diff --git a/chromium/third_party/blink/renderer/core/paint/paint_layer.h b/chromium/third_party/blink/renderer/core/paint/paint_layer.h
index 2b6736933d7..2f8f0bf9288 100644
--- a/chromium/third_party/blink/renderer/core/paint/paint_layer.h
+++ b/chromium/third_party/blink/renderer/core/paint/paint_layer.h
@@ -384,6 +384,8 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
// Layer::paint*() methods.
PaintLayer* EnclosingLayerForPaintInvalidation() const;
+ // https://crbug.com/751768, this function can return nullptr sometimes.
+ // Always check the result before using it, don't just DCHECK.
PaintLayer* EnclosingLayerForPaintInvalidationCrossingFrameBoundaries() const;
bool HasAncestorWithFilterThatMovesPixels() const;
diff --git a/chromium/third_party/blink/renderer/core/paint/paint_layer_stacking_node.cc b/chromium/third_party/blink/renderer/core/paint/paint_layer_stacking_node.cc
index e61e03b2bdb..ae441293400 100644
--- a/chromium/third_party/blink/renderer/core/paint/paint_layer_stacking_node.cc
+++ b/chromium/third_party/blink/renderer/core/paint/paint_layer_stacking_node.cc
@@ -240,7 +240,7 @@ bool PaintLayerStackingNode::StyleDidChange(PaintLayer* paint_layer,
const ComputedStyle* old_style) {
bool was_stacking_context = false;
bool was_stacked = false;
- bool old_z_index = 0;
+ int old_z_index = 0;
if (old_style) {
was_stacking_context = old_style->IsStackingContext();
old_z_index = old_style->ZIndex();
diff --git a/chromium/third_party/blink/renderer/core/style/computed_style.cc b/chromium/third_party/blink/renderer/core/style/computed_style.cc
index c6aa9af2492..4ff9f1e3a61 100644
--- a/chromium/third_party/blink/renderer/core/style/computed_style.cc
+++ b/chromium/third_party/blink/renderer/core/style/computed_style.cc
@@ -63,6 +63,7 @@
#include "third_party/blink/renderer/platform/graphics/path.h"
#include "third_party/blink/renderer/platform/length_functions.h"
#include "third_party/blink/renderer/platform/text/capitalize.h"
+#include "third_party/blink/renderer/platform/text/character.h"
#include "third_party/blink/renderer/platform/transforms/rotate_transform_operation.h"
#include "third_party/blink/renderer/platform/transforms/scale_transform_operation.h"
#include "third_party/blink/renderer/platform/transforms/translate_transform_operation.h"
@@ -914,7 +915,7 @@ void ComputedStyle::UpdateIsStackingContext(bool is_document_element,
// which requires flattening. See ComputedStyle::UsedTransformStyle3D() and
// ComputedStyle::HasGroupingProperty().
// This is legacy behavior that is left ambiguous in the official specs.
- // See crbug.com/663650 for more details."
+ // See https://crbug.com/663650 for more details."
if (TransformStyle3D() == ETransformStyle3D::kPreserve3d) {
SetIsStackingContext(true);
return;
@@ -1401,6 +1402,34 @@ bool ComputedStyle::ShouldUseTextIndent(bool is_first_line,
: !should_use;
}
+// Unicode 11 introduced Georgian capital letters (U+1C90 - U+1CBA,
+// U+1CB[D-F]), but virtually no font covers them. For now map them back
+// to their lowercase counterparts (U+10D0 - U+10FA, U+10F[D-F]).
+// https://www.unicode.org/charts/PDF/U10A0.pdf
+// https://www.unicode.org/charts/PDF/U1C90.pdf
+// See https://crbug.com/865427 .
+// TODO(jshin): Make this platform-dependent. For instance, turn this
+// off when CrOS gets new Georgian fonts covering capital letters.
+// ( https://crbug.com/880144 ).
+static String DisableNewGeorgianCapitalLetters(const String& text) {
+ if (text.IsNull() || text.Is8Bit())
+ return text;
+ unsigned length = text.length();
+ const StringImpl& input = *(text.Impl());
+ StringBuilder result;
+ result.ReserveCapacity(length);
+ // |input| must be well-formed UTF-16 so that there's no worry
+ // about surrogate handling.
+ for (unsigned i = 0; i < length; ++i) {
+ UChar character = input[i];
+ if (Character::IsModernGeorgianUppercase(character))
+ result.Append(Character::LowercaseModernGeorgianUppercase(character));
+ else
+ result.Append(character);
+ }
+ return result.ToString();
+}
+
void ComputedStyle::ApplyTextTransform(String* text,
UChar previous_character) const {
switch (TextTransform()) {
@@ -1410,7 +1439,7 @@ void ComputedStyle::ApplyTextTransform(String* text,
*text = Capitalize(*text, previous_character);
return;
case ETextTransform::kUppercase:
- *text = text->UpperUnicode(Locale());
+ *text = DisableNewGeorgianCapitalLetters(text->UpperUnicode(Locale()));
return;
case ETextTransform::kLowercase:
*text = text->LowerUnicode(Locale());
diff --git a/chromium/third_party/blink/renderer/core/workers/worker_global_scope.h b/chromium/third_party/blink/renderer/core/workers/worker_global_scope.h
index 41432025041..61e7370f9bf 100644
--- a/chromium/third_party/blink/renderer/core/workers/worker_global_scope.h
+++ b/chromium/third_party/blink/renderer/core/workers/worker_global_scope.h
@@ -223,7 +223,7 @@ class CORE_EXPORT WorkerGlobalScope
int last_pending_error_event_id_ = 0;
Member<OffscreenFontSelector> font_selector_;
- Member<WorkerAnimationFrameProvider> animation_frame_provider_;
+ TraceWrapperMember<WorkerAnimationFrameProvider> animation_frame_provider_;
service_manager::InterfaceProvider interface_provider_;
};
diff --git a/chromium/third_party/blink/renderer/modules/mediasource/media_source.h b/chromium/third_party/blink/renderer/modules/mediasource/media_source.h
index 0b288aa1ce0..a26dd1240b2 100644
--- a/chromium/third_party/blink/renderer/modules/mediasource/media_source.h
+++ b/chromium/third_party/blink/renderer/modules/mediasource/media_source.h
@@ -147,7 +147,7 @@ class MediaSource final : public EventTargetWithInlineData,
std::unique_ptr<WebMediaSource> web_media_source_;
AtomicString ready_state_;
Member<EventQueue> async_event_queue_;
- WeakMember<HTMLMediaElement> attached_element_;
+ Member<HTMLMediaElement> attached_element_;
Member<SourceBufferList> source_buffers_;
Member<SourceBufferList> active_source_buffers_;
diff --git a/chromium/third_party/blink/renderer/modules/service_worker/navigator_service_worker.cc b/chromium/third_party/blink/renderer/modules/service_worker/navigator_service_worker.cc
index 157a288afa9..4c438f47edd 100644
--- a/chromium/third_party/blink/renderer/modules/service_worker/navigator_service_worker.cc
+++ b/chromium/third_party/blink/renderer/modules/service_worker/navigator_service_worker.cc
@@ -22,6 +22,9 @@ NavigatorServiceWorker* NavigatorServiceWorker::From(Document& document) {
if (!frame)
return nullptr;
+ // TODO(kouhei): Remove below after M72, since the check is now done in
+ // RenderFrameImpl::CreateServiceWorkerProvider instead.
+ //
// Bail-out if we are about to be navigated away.
// We check that DocumentLoader is attached since:
// - This serves as the signal since the DocumentLoader is detached in
diff --git a/chromium/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc b/chromium/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
index 88422541d51..7f8abac90a5 100644
--- a/chromium/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
+++ b/chromium/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
@@ -92,13 +92,13 @@ class CanvasResourceProviderTexture : public CanvasResourceProvider {
SkSurface::kRetain_ContentChangeMode);
}
- sk_sp<SkImage> skia_image = GetSkSurface()->makeImageSnapshot();
- if (!skia_image)
+ auto paint_image = MakeImageSnapshot();
+ if (!paint_image)
return nullptr;
- DCHECK(skia_image->isTextureBacked());
+ DCHECK(paint_image.GetSkImage()->isTextureBacked());
- scoped_refptr<StaticBitmapImage> image =
- StaticBitmapImage::Create(skia_image, ContextProviderWrapper());
+ scoped_refptr<StaticBitmapImage> image = StaticBitmapImage::Create(
+ paint_image.GetSkImage(), ContextProviderWrapper());
scoped_refptr<CanvasResource> resource = CanvasResourceBitmap::Create(
image, CreateWeakPtr(), FilterQuality(), ColorParams());
@@ -179,12 +179,13 @@ class CanvasResourceProviderTextureGpuMemoryBuffer final
return CanvasResourceProviderTexture::ProduceFrame();
}
- sk_sp<SkImage> image = GetSkSurface()->makeImageSnapshot();
- if (!image)
+ auto paint_image = MakeImageSnapshot();
+ if (!paint_image)
return nullptr;
- DCHECK(image->isTextureBacked());
+ DCHECK(paint_image.GetSkImage()->isTextureBacked());
- GrBackendTexture backend_texture = image->getBackendTexture(true);
+ GrBackendTexture backend_texture =
+ paint_image.GetSkImage()->getBackendTexture(true);
DCHECK(backend_texture.isValid());
GrGLTextureInfo info;
@@ -287,12 +288,12 @@ class CanvasResourceProviderRamGpuMemoryBuffer final
return nullptr;
}
- sk_sp<SkImage> image = GetSkSurface()->makeImageSnapshot();
- if (!image)
+ auto paint_image = MakeImageSnapshot();
+ if (!paint_image)
return nullptr;
- DCHECK(!image->isTextureBacked());
+ DCHECK(!paint_image.GetSkImage()->isTextureBacked());
- output_resource->TakeSkImage(std::move(image));
+ output_resource->TakeSkImage(paint_image.GetSkImage());
return output_resource;
}
@@ -340,12 +341,12 @@ class CanvasResourceProviderSharedBitmap : public CanvasResourceProviderBitmap {
return nullptr;
}
- sk_sp<SkImage> image = GetSkSurface()->makeImageSnapshot();
- if (!image)
+ auto paint_image = MakeImageSnapshot();
+ if (!paint_image)
return nullptr;
- DCHECK(!image->isTextureBacked());
+ DCHECK(!paint_image.GetSkImage()->isTextureBacked());
- output_resource->TakeSkImage(std::move(image));
+ output_resource->TakeSkImage(paint_image.GetSkImage());
return output_resource;
}
@@ -619,15 +620,22 @@ scoped_refptr<StaticBitmapImage> CanvasResourceProvider::Snapshot() {
if (!IsValid())
return nullptr;
+ auto paint_image = MakeImageSnapshot();
+ if (paint_image.GetSkImage()->isTextureBacked() && ContextProviderWrapper()) {
+ return StaticBitmapImage::Create(paint_image.GetSkImage(),
+ ContextProviderWrapper());
+ }
+ return StaticBitmapImage::Create(std::move(paint_image));
+}
+
+cc::PaintImage CanvasResourceProvider::MakeImageSnapshot() {
auto sk_image = GetSkSurface()->makeImageSnapshot();
+ if (!sk_image)
+ return cc::PaintImage();
+
auto last_snapshot_sk_image_id = snapshot_sk_image_id_;
snapshot_sk_image_id_ = sk_image->uniqueID();
- if (ContextProviderWrapper()) {
- return StaticBitmapImage::Create(std::move(sk_image),
- ContextProviderWrapper());
- }
-
// Ensure that a new PaintImage::ContentId is used only when the underlying
// SkImage changes. This is necessary to ensure that the same image results
// in a cache hit in cc's ImageDecodeCache.
@@ -636,12 +644,10 @@ scoped_refptr<StaticBitmapImage> CanvasResourceProvider::Snapshot() {
snapshot_paint_image_content_id_ = PaintImage::GetNextContentId();
}
- auto paint_image =
- PaintImageBuilder::WithDefault()
- .set_id(snapshot_paint_image_id_)
- .set_image(std::move(sk_image), snapshot_paint_image_content_id_)
- .TakePaintImage();
- return StaticBitmapImage::Create(std::move(paint_image));
+ return PaintImageBuilder::WithDefault()
+ .set_id(snapshot_paint_image_id_)
+ .set_image(std::move(sk_image), snapshot_paint_image_content_id_)
+ .TakePaintImage();
}
gpu::gles2::GLES2Interface* CanvasResourceProvider::ContextGL() const {
diff --git a/chromium/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h b/chromium/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h
index b4a546d4c03..2e0197b412f 100644
--- a/chromium/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h
+++ b/chromium/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h
@@ -148,6 +148,13 @@ class PLATFORM_EXPORT CanvasResourceProvider
base::WeakPtr<WebGraphicsContext3DProviderWrapper>,
base::WeakPtr<CanvasResourceDispatcher>);
+ // Its important to use this method for generating PaintImage wrapped canvas
+ // snapshots to get a cache hit from cc's ImageDecodeCache. This method
+ // ensures that the PaintImage ID for the snapshot, used for keying
+ // decodes/uploads in the cache is invalidated only when the canvas contents
+ // change.
+ cc::PaintImage MakeImageSnapshot();
+
private:
class CanvasImageProvider : public cc::ImageProvider {
public:
diff --git a/chromium/third_party/blink/renderer/platform/text/character.h b/chromium/third_party/blink/renderer/platform/text/character.h
index c436616ec61..8437e4d3db5 100644
--- a/chromium/third_party/blink/renderer/platform/text/character.h
+++ b/chromium/third_party/blink/renderer/platform/text/character.h
@@ -186,6 +186,18 @@ class PLATFORM_EXPORT Character {
static bool IsPrivateUse(UChar32);
static bool IsNonCharacter(UChar32);
+ static bool IsModernGeorgianUppercase(UChar32 c) {
+ return IsInRange(c, 0x1C90, 0x1CBF);
+ }
+
+ // Map modern secular Georgian uppercase letters added in Unicode
+ // 11.0 to their corresponding lowercase letters.
+ // https://www.unicode.org/charts/PDF/U10A0.pdf
+ // https://www.unicode.org/charts/PDF/U1C90.pdf
+ static UChar32 LowercaseModernGeorgianUppercase(UChar32 c) {
+ return (c - (0x1C90 - 0x10D0));
+ }
+
private:
static bool IsCJKIdeographOrSymbolSlow(UChar32);
static bool IsHangulSlow(UChar32);
diff --git a/chromium/third_party/cros_system_api/dbus/authpolicy/active_directory_info.proto b/chromium/third_party/cros_system_api/dbus/authpolicy/active_directory_info.proto
index aa85c126173..97f3c912ed2 100644
--- a/chromium/third_party/cros_system_api/dbus/authpolicy/active_directory_info.proto
+++ b/chromium/third_party/cros_system_api/dbus/authpolicy/active_directory_info.proto
@@ -97,8 +97,10 @@ enum ErrorType {
ERROR_KDC_DOES_NOT_SUPPORT_ENCRYPTION_TYPE = 36;
// Kpasswd exited with unspecified error.
ERROR_KPASSWD_FAILED = 37;
+ // Setting computer organizational unit failed with constraint violation.
+ ERROR_OU_CONSTRAINT_VIOLATION = 38;
// Should be the last.
- ERROR_COUNT = 38;
+ ERROR_COUNT = 39;
}
// Message sent to Chrome by authpolicyd as a response of a successful
diff --git a/chromium/third_party/cros_system_api/dbus/login_manager/arc.proto b/chromium/third_party/cros_system_api/dbus/login_manager/arc.proto
index e1ab900bb38..16dc3fa8d3e 100644
--- a/chromium/third_party/cros_system_api/dbus/login_manager/arc.proto
+++ b/chromium/third_party/cros_system_api/dbus/login_manager/arc.proto
@@ -12,6 +12,8 @@ package login_manager;
// in the SessionManagerInterface.StartArcMiniContainer method.
message StartArcMiniContainerRequest {
optional bool native_bridge_experiment = 1 [default = false];
+ // The density value passed to "ro.sf.lcd_density" property.
+ optional int32 lcd_density = 2 [default = -1];
}
// ARC upgrade options sent from Chrome to session manager. This message is used
diff --git a/chromium/third_party/cros_system_api/dbus/login_manager/dbus-constants.h b/chromium/third_party/cros_system_api/dbus/login_manager/dbus-constants.h
index bef2d772019..73f80bbcf20 100644
--- a/chromium/third_party/cros_system_api/dbus/login_manager/dbus-constants.h
+++ b/chromium/third_party/cros_system_api/dbus/login_manager/dbus-constants.h
@@ -33,6 +33,8 @@ const char kSessionManagerStoreDeviceLocalAccountPolicy[] =
"StoreDeviceLocalAccountPolicy";
const char kSessionManagerRetrieveDeviceLocalAccountPolicy[] =
"RetrieveDeviceLocalAccountPolicy";
+const char kSessionManagerListStoredComponentPolicies[] =
+ "ListStoredComponentPolicies";
const char kSessionManagerRetrieveSessionState[] = "RetrieveSessionState";
const char kSessionManagerRetrieveActiveSessions[] = "RetrieveActiveSessions";
const char kSessionManagerStartTPMFirmwareUpdate[] = "StartTPMFirmwareUpdate";
diff --git a/chromium/third_party/cros_system_api/dbus/permission_broker/dbus-constants.h b/chromium/third_party/cros_system_api/dbus/permission_broker/dbus-constants.h
index d3d37efc1e7..d83e616dc7c 100644
--- a/chromium/third_party/cros_system_api/dbus/permission_broker/dbus-constants.h
+++ b/chromium/third_party/cros_system_api/dbus/permission_broker/dbus-constants.h
@@ -12,7 +12,6 @@ const char kPermissionBrokerServiceName[] = "org.chromium.PermissionBroker";
// Methods
const char kCheckPathAccess[] = "CheckPathAccess";
-const char kRequestPathAccess[] = "RequestPathAccess";
const char kOpenPath[] = "OpenPath";
const char kRequestTcpPortAccess[] = "RequestTcpPortAccess";
const char kRequestUdpPortAccess[] = "RequestUdpPortAccess";
diff --git a/chromium/third_party/cros_system_api/dbus/seneschal/dbus-constants.h b/chromium/third_party/cros_system_api/dbus/seneschal/dbus-constants.h
new file mode 100644
index 00000000000..feb2c122f40
--- /dev/null
+++ b/chromium/third_party/cros_system_api/dbus/seneschal/dbus-constants.h
@@ -0,0 +1,24 @@
+// Copyright 2018 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYSTEM_API_DBUS_SENESCHAL_DBUS_CONSTANTS_H_
+#define SYSTEM_API_DBUS_SENESCHAL_DBUS_CONSTANTS_H_
+
+namespace vm_tools {
+namespace seneschal {
+
+const char kSeneschalInterface[] = "org.chromium.Seneschal";
+const char kSeneschalServicePath[] = "/org/chromium/Seneschal";
+const char kSeneschalServiceName[] = "org.chromium.Seneschal";
+
+// Exported methods.
+const char kStartServerMethod[] = "StartServer";
+const char kStopServerMethod[] = "StopServer";
+const char kSharePathMethod[] = "SharePath";
+
+
+} // namespace seneschal
+} // namespace vm_tools
+
+#endif // SYSTEM_API_DBUS_SENESCHAL_DBUS_CONSTANTS_H_
diff --git a/chromium/third_party/cros_system_api/dbus/seneschal/service.proto b/chromium/third_party/cros_system_api/dbus/seneschal/service.proto
new file mode 100644
index 00000000000..4d0a6e2ae04
--- /dev/null
+++ b/chromium/third_party/cros_system_api/dbus/seneschal/service.proto
@@ -0,0 +1,121 @@
+// Copyright 2017 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+syntax = "proto3";
+option optimize_for = LITE_RUNTIME;
+
+// This file defines messages for starting, stopping, and managing 9p servers
+// with access to the user's home directory.
+package vm_tools.seneschal;
+option go_package = "seneschal_proto";
+
+// Defines a path to be shared with a 9p server.
+message SharedPath {
+ // Path to be shared. The basename of this path is appended to the root of
+ // the server to get the destination path. For example,
+ // "/home/chronos/user/Downloads/project" will be visible to the server as
+ // "/project". Note that this means that it is not possible to share 2
+ // different paths with the same name with the same server as they would
+ // both have the same destination path inside the server's root directory.
+ string path = 1;
+
+ // Whether the path should be writable by the server. Due to limitations in
+ // the way bind mounts interact with user namespaces, setting this to false
+ // will not currently do anything. All shared paths are writable. Maybe
+ // one day if the linux developers decide that dropping privileges should
+ // not require having additional privileges that you wouldn't otherwise need
+ // we can maybe do something useful with this.
+ bool writable = 2;
+}
+
+// Defines the vsock address on which a server should listen for requests.
+// The server will always use context id 2 (VM host) as its address.
+message VsockAddress {
+ // The port number on which the server should listen for requests.
+ uint32 port = 1;
+
+ // The context id from which this server should accept connections.
+ uint32 accept_cid = 2;
+}
+
+// Defines the unix address on which a server should listen for requests.
+message UnixAddress {
+ // The path on the system where the server should listen for requests.
+ string path = 1;
+}
+
+// Defines the network address on which a server should listen for requests.
+// The server will always use localhost as its address.
+message NetworkAddress {
+ // The port on which the server should listen for requests.
+ uint32 port = 1;
+}
+
+// Indicates that the message includes a file descriptor on which the server
+// should listen for requests.
+message FileDescriptor {}
+
+// Information that must be included with every StartServer dbus request.
+message StartServerRequest {
+ // The address on which the server should listen for requests.
+ oneof listen_address {
+ VsockAddress vsock = 1;
+ UnixAddress unix_addr = 2;
+ NetworkAddress net = 3;
+ FileDescriptor fd = 4;
+ }
+}
+
+// Information sent back by seneschal in response to a StartServer message.
+message StartServerResponse {
+ // Set to true if the server was started successfully.
+ bool success = 1;
+
+ // The handle with which to refer to this server in future requests. Only
+ // valid if |success| is true.
+ uint32 handle = 2;
+
+ // The reason why the server failed to start, if any. Only valid when
+ // |success| is false.
+ string failure_reason = 3;
+}
+
+// Information that must be included with every StopServer request.
+message StopServerRequest {
+ // The handle to the server that should be stopped.
+ uint32 handle = 1;
+}
+
+// Information sent back by seneschal when it receives a StopServer requests.
+message StopServerResponse {
+ // If true, then the server was successfully stopped.
+ bool success = 1;
+
+ // The reason why the server could not be stopped, if any. Only valid when
+ // |success| is false.
+ string failure_reason = 2;
+}
+
+// Information that must be included with every SharePath request.
+message SharePathRequest {
+ // The handle to the server with whom the path should be shared.
+ uint32 handle = 1;
+
+ // The actual path to be shared.
+ SharedPath shared_path = 2;
+}
+
+// Information sent back by seneschal when it receives a SharePath request.
+message SharePathResponse {
+ // If true, then the path was shared successfully.
+ bool success = 1;
+
+ // The path relative to the server's root where the shared path can be
+ // accessed. Only valid if |success| is true.
+ string path = 2;
+
+ // The reason why the path could not be shared, if any. Only valid when
+ // |success| is false.
+ string failure_reason = 3;
+}
diff --git a/chromium/third_party/cros_system_api/dbus/service_constants.h b/chromium/third_party/cros_system_api/dbus/service_constants.h
index be3016a16b3..4491890f2a8 100644
--- a/chromium/third_party/cros_system_api/dbus/service_constants.h
+++ b/chromium/third_party/cros_system_api/dbus/service_constants.h
@@ -22,6 +22,7 @@
#include "lorgnette/dbus-constants.h"
#include "permission_broker/dbus-constants.h"
#include "power_manager/dbus-constants.h"
+#include "seneschal/dbus-constants.h"
#include "shill/dbus-constants.h"
#include "smbprovider/dbus-constants.h"
#include "update_engine/dbus-constants.h"
@@ -79,6 +80,15 @@ const char kBadResult[] = "";
const char kTerminaComponentName[] = "cros-termina";
} // namespace imageloader
+namespace dlcservice {
+const char kDlcServiceInterface[] = "org.chromium.DlcServiceInterface";
+const char kDlcServiceName[] = "org.chromium.DlcService";
+const char kDlcServicePath[] = "/org/chromium/DlcService";
+// Methods
+const char kInstallMethod[] = "Install";
+const char kUninstallMethod[] = "Uninstall";
+} // namespace dlcservice
+
namespace speech_synthesis {
const char kSpeechSynthesizerInterface[] =
"org.chromium.SpeechSynthesizerInterface";
diff --git a/chromium/third_party/cros_system_api/dbus/vm_cicerone/cicerone_service.proto b/chromium/third_party/cros_system_api/dbus/vm_cicerone/cicerone_service.proto
index 4de07e7d8a8..4f1edccd02c 100644
--- a/chromium/third_party/cros_system_api/dbus/vm_cicerone/cicerone_service.proto
+++ b/chromium/third_party/cros_system_api/dbus/vm_cicerone/cicerone_service.proto
@@ -28,6 +28,9 @@ message NotifyVmStartedRequest {
// The IPv4 address of the VM in network byte order.
uint32 ipv4_address = 5;
+
+ // The virtual socket context id assigned to the VM.
+ uint32 cid = 6;
}
// Message sent to cicerone when a VM stopped or failed to complete startup.
diff --git a/chromium/third_party/cros_system_api/dbus/vm_concierge/service.proto b/chromium/third_party/cros_system_api/dbus/vm_concierge/service.proto
index 25516c24f20..6d3aac180ff 100644
--- a/chromium/third_party/cros_system_api/dbus/vm_concierge/service.proto
+++ b/chromium/third_party/cros_system_api/dbus/vm_concierge/service.proto
@@ -66,6 +66,11 @@ message VmInfo {
// The virtual socket context id assigned to the VM.
int64 cid = 3;
+
+ // The handle to a 9p server managed by the seneschal system service. Use
+ // this handle when making requests to that service to manage the files shared
+ // with this VM.
+ uint64 seneschal_server_handle = 4;
}
// Information that must be included with every StartVm dbus message.
@@ -78,7 +83,10 @@ message StartVmRequest {
repeated DiskImage disks = 2;
// Path to a shared directory that will be mounted via NFS inside the VM.
- string shared_directory = 3;
+ // DEPRECATED: The server never did anything with this field. Instead callers
+ // should use the |shared_dir_handle| field of the VmInfo message to get a
+ // server handle that can be used in requests to the seneschal system service.
+ string shared_directory = 3 [deprecated = true];
// The human-readable name to be assigned to this VM.
string name = 4;
@@ -362,7 +370,7 @@ message ContainerSshKeysResponse {
// generated file.
string container_public_key = 1;
- // Private key for the host, counterpart fo the public key which is stored in
+ // Private key for the host, counterpart to the public key which is stored in
// the container as an authorized host. This will be a multiline string that
// is equivalent to the contents in the ssh-keygen generated file. This will
// be the same for all VMs/containers.
@@ -370,4 +378,15 @@ message ContainerSshKeysResponse {
// The hostname of the container.
string hostname = 3;
+
+ // Public key of the host for verification of it as a known host. This
+ // will be a single line string equivalent to the contents in the ssh-keygen
+ // generated file.
+ string host_public_key = 4;
+
+ // Private key for the container, counterpart to the public key which is
+ // stored in the container. This will be a multiline string that
+ // is equivalent to the contents in the ssh-keygen generated file. This is
+ // unique for each container.
+ string container_private_key = 5;
}
diff --git a/chromium/third_party/cros_system_api/system_api.gyp b/chromium/third_party/cros_system_api/system_api.gyp
index f23aee46570..7b5bf63247e 100644
--- a/chromium/third_party/cros_system_api/system_api.gyp
+++ b/chromium/third_party/cros_system_api/system_api.gyp
@@ -309,5 +309,28 @@
'<(SHARED_INTERMEDIATE_DIR)/include/vm_applications/proto_bindings/apps.pb.cc',
]
},
+ {
+ 'target_name': 'system_api-seneschal-protos-gen',
+ 'type': 'none',
+ 'variables': {
+ 'proto_in_dir': 'dbus/seneschal',
+ 'proto_out_dir': 'include/seneschal/proto_bindings',
+ },
+ 'sources': [
+ '<(proto_in_dir)/service.proto',
+ ],
+ 'includes': ['../../platform2/common-mk/protoc.gypi'],
+ },
+ {
+ 'target_name': 'system_api-seneschal-protos',
+ 'type': 'static_library',
+ 'standalone_static_library': 1,
+ 'dependencies': [
+ 'system_api-seneschal-protos-gen',
+ ],
+ 'sources': [
+ '<(SHARED_INTERMEDIATE_DIR)/include/seneschal/proto_bindings/service.pb.cc',
+ ]
+ },
],
}
diff --git a/chromium/third_party/cros_system_api/system_api.pc b/chromium/third_party/cros_system_api/system_api.pc
index ab6af8470ee..ecf8fe50512 100644
--- a/chromium/third_party/cros_system_api/system_api.pc
+++ b/chromium/third_party/cros_system_api/system_api.pc
@@ -1,4 +1,4 @@
Name: system_api
Description: Protobuffers and headers shared by Chromium OS and Chromium.
Version: 0.1
-Libs: -lsystem_api-power_manager-protos -lsystem_api-cryptohome-protos -lsystem_api-authpolicy-protos -lsystem_api-biod-protos -lsystem_api-protos -lsystem_api-login_manager-protos -lsystem_api-chaps-protos -lsystem_api-smbprovider-protos -lsystem_api-vm_concierge-protos -lsystem_api-vm_applications-protos -lsystem_api-vm_cicerone-protos
+Libs: -lsystem_api-power_manager-protos -lsystem_api-cryptohome-protos -lsystem_api-authpolicy-protos -lsystem_api-biod-protos -lsystem_api-protos -lsystem_api-login_manager-protos -lsystem_api-chaps-protos -lsystem_api-smbprovider-protos -lsystem_api-vm_concierge-protos -lsystem_api-vm_applications-protos -lsystem_api-vm_cicerone-protos -lsystem_api-seneschal-protos
diff --git a/chromium/third_party/fontconfig/README.chromium b/chromium/third_party/fontconfig/README.chromium
index ca56b6a4e55..69f7c4008a2 100644
--- a/chromium/third_party/fontconfig/README.chromium
+++ b/chromium/third_party/fontconfig/README.chromium
@@ -1,6 +1,6 @@
Name: fontconfig
URL: http://www.freedesktop.org/wiki/Software/fontconfig/
-Version: d1f48f11d5dffa1d954a1b0abe44ce9e4bfc3709
+Version: ba206df9b9a7ca300265f650842c1459ff7c634a
License: MIT
License File: src/COPYING
Security Critical: yes
diff --git a/chromium/third_party/fontconfig/include/config.h b/chromium/third_party/fontconfig/include/config.h
index 37426801186..52938df1aae 100644
--- a/chromium/third_party/fontconfig/include/config.h
+++ b/chromium/third_party/fontconfig/include/config.h
@@ -264,13 +264,13 @@
#define PACKAGE "fontconfig"
/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
+#define PACKAGE_BUGREPORT "https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new"
/* Define to the full name of this package. */
#define PACKAGE_NAME "fontconfig"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "fontconfig 2.13.0"
+#define PACKAGE_STRING "fontconfig 2.13.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "fontconfig"
@@ -279,7 +279,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "2.13.0"
+#define PACKAGE_VERSION "2.13.1"
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
@@ -332,7 +332,7 @@
/* Version number of package */
-#define VERSION "2.13.0"
+#define VERSION "2.13.1"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
diff --git a/chromium/third_party/fontconfig/include/src/fcalias.h b/chromium/third_party/fontconfig/include/src/fcalias.h
index da5f5f11bba..940a7b1371b 100644
--- a/chromium/third_party/fontconfig/include/src/fcalias.h
+++ b/chromium/third_party/fontconfig/include/src/fcalias.h
@@ -412,6 +412,8 @@ extern __typeof (FcUtf16ToUcs4) IA__FcUtf16ToUcs4 FC_ATTRIBUTE_VISIBILITY_HIDDEN
#define FcUtf16ToUcs4 IA__FcUtf16ToUcs4
extern __typeof (FcUtf16Len) IA__FcUtf16Len FC_ATTRIBUTE_VISIBILITY_HIDDEN;
#define FcUtf16Len IA__FcUtf16Len
+extern __typeof (FcStrBuildFilename) IA__FcStrBuildFilename FC_ATTRIBUTE_VISIBILITY_HIDDEN;
+#define FcStrBuildFilename IA__FcStrBuildFilename
extern __typeof (FcStrDirname) IA__FcStrDirname FC_ATTRIBUTE_VISIBILITY_HIDDEN;
#define FcStrDirname IA__FcStrDirname
extern __typeof (FcStrBasename) IA__FcStrBasename FC_ATTRIBUTE_VISIBILITY_HIDDEN;
diff --git a/chromium/third_party/fontconfig/include/src/fcaliastail.h b/chromium/third_party/fontconfig/include/src/fcaliastail.h
index 80b3ac6d669..44fbc3cfdd3 100644
--- a/chromium/third_party/fontconfig/include/src/fcaliastail.h
+++ b/chromium/third_party/fontconfig/include/src/fcaliastail.h
@@ -462,6 +462,8 @@ extern __typeof (FcUcs4ToUtf8) FcUcs4ToUtf8 __attribute((alias("IA__FcUcs4ToUtf8
extern __typeof (FcUtf16ToUcs4) FcUtf16ToUcs4 __attribute((alias("IA__FcUtf16ToUcs4"))) FC_ATTRIBUTE_VISIBILITY_EXPORT;
# undef FcUtf16Len
extern __typeof (FcUtf16Len) FcUtf16Len __attribute((alias("IA__FcUtf16Len"))) FC_ATTRIBUTE_VISIBILITY_EXPORT;
+# undef FcStrBuildFilename
+extern __typeof (FcStrBuildFilename) FcStrBuildFilename __attribute((alias("IA__FcStrBuildFilename"))) FC_ATTRIBUTE_VISIBILITY_EXPORT;
# undef FcStrDirname
extern __typeof (FcStrDirname) FcStrDirname __attribute((alias("IA__FcStrDirname"))) FC_ATTRIBUTE_VISIBILITY_EXPORT;
# undef FcStrBasename
diff --git a/chromium/third_party/fontconfig/include/src/fcstdint.h b/chromium/third_party/fontconfig/include/src/fcstdint.h
index 2553985dfbf..2db863eb52d 100644
--- a/chromium/third_party/fontconfig/include/src/fcstdint.h
+++ b/chromium/third_party/fontconfig/include/src/fcstdint.h
@@ -1,8 +1,8 @@
#ifndef _FONTCONFIG_SRC_FCSTDINT_H
#define _FONTCONFIG_SRC_FCSTDINT_H 1
#ifndef _GENERATED_STDINT_H
-#define _GENERATED_STDINT_H "fontconfig 2.13.0"
-/* generated using gnu compiler gcc (Debian 7.3.0-24) 7.3.0 */
+#define _GENERATED_STDINT_H "fontconfig 2.13.1"
+/* generated using gnu compiler gcc (Debian 8.2.0-6) 8.2.0 */
#define _STDINT_HAVE_STDINT_H 1
#include <stdint.h>
#endif
diff --git a/chromium/third_party/fontconfig/src/.gitlab-ci.yml b/chromium/third_party/fontconfig/src/.gitlab-ci.yml
new file mode 100644
index 00000000000..6d356aedcab
--- /dev/null
+++ b/chromium/third_party/fontconfig/src/.gitlab-ci.yml
@@ -0,0 +1,53 @@
+image: fedora:rawhide
+
+stages:
+ - build
+
+before_script:
+ - dnf -y upgrade --disablerepo=rawhide-modular --nogpgcheck fedora-repos fedora-repos-rawhide
+ - dnf -y upgrade --disablerepo=rawhide-modular
+ - dnf -y install --disablerepo=rawhide-modular @buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel freetype-devel libuuid-devel json-c-devel git docbook-utils docbook-utils-pdf
+
+shared-build:
+ stage: build
+ script:
+ - export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
+ - export PREFIX="$(pwd)/prefix-$BUILD_ID"
+ - export BUILDDIR="$(pwd)/build-$BUILD_ID"
+ - export MAKEFLAGS="-j4"
+ - mkdir "$BUILDDIR" "$PREFIX"
+ - cd "$BUILDDIR"
+ - ../autogen.sh --prefix="$PREFIX" --enable-shared --disable-static
+ - make
+ - make check
+ - make install
+ - make distcheck
+ artifacts:
+ name: fontconfig-$CI_COMMIT_SHA-$CI_JOB_ID
+ when: always
+ paths:
+ - build-*/fontconfig-*.tar.bz2
+ - build-*/fontconfig*/_build/sub/*.log
+ - build-*/fontconfig*/_build/sub/test/*.log
+ - build-*/fontconfig*/_build/sub/test/*.trs
+ - build-*/*.log
+ - prefix-*
+static-build:
+ stage: build
+ script:
+ - export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
+ - export PREFIX="$(pwd)/prefix-$BUILD_ID"
+ - export BUILDDIR="$(pwd)/build-$BUILD_ID"
+ - export MAKEFLAGS="-j4"
+ - mkdir "$BUILDDIR"
+ - cd "$BUILDDIR"
+ - ../autogen.sh --prefix="$PREFIX" --disable-shared --enable-static
+ - make
+ - make check
+ artifacts:
+ name: fontconfig-$CI_COMMIT_SHA-$CI_JOB_ID
+ when: always
+ paths:
+ - build-*/*.log
+ - build-*/test/*.log
+ - build-*/test/*.trs
diff --git a/chromium/third_party/fontconfig/src/README b/chromium/third_party/fontconfig/src/README
index c5e605d6436..fbbc140e998 100644
--- a/chromium/third_party/fontconfig/src/README
+++ b/chromium/third_party/fontconfig/src/README
@@ -1,11 +1,89 @@
Fontconfig
Font configuration and customization library
- Version 2.13
- 2018-03-06
+ Version 2.13.1
+ 2018-08-30
Check INSTALL for compilation and installation instructions.
-Report bugs to https://bugs.freedesktop.org in the fontconfig module.
+Report bugs to https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new.
+
+2.13.1
+
+Akira TAGOH (48):
+ Use the builtin uuid for OSX
+ Fix the build issue again on MinGW with enabling nls
+ Add uuid to Requires.private in .pc only when pkgconfig macro found it
+ Allow the constant names in the range
+ Do not override locale if already set by app
+ Add the value of the constant name to the implicit object in the pattern
+ Add a testcase for FcNameParse
+ Leave the locale setting to applications
+ call setlocale
+ Fix make check fail when srcdir != builddir.
+ Do not ship fcobjshash.h
+ Fix typo in doc
+ Change the emboldening logic again
+ Bug 43367 - RFE: iterator to peek objects in FcPattern
+ Add a testrunner for conf
+ Add a test case for 90-synthetic.conf
+ Bug 106497 - better error description when problem reading font configuration
+ Bug 106459 - fc-cache doesn't use -y option for .uuid files
+ Fix leaks
+ Fix -Wstringop-truncation warning
+ Fix double-free
+ Add a test case for bz#106618
+ Update CaseFolding.txt to Unicode 11
+ Remove .uuid when no font files exists on a directory
+ Fix the leak of file handle
+ Fix memory leak
+ Fix memory leaks
+ Fix memory leak
+ Fix memory leak
+ Fix memory leak
+ Fix unterminated string issue
+ Fix array access in a null pointer dereference
+ Fix access in a null pointer dereference
+ do not pass null pointer to memcpy
+ Fix dereferencing null pointer
+ Fix a typo
+ Fix possibly dereferencing a null pointer
+ Fix allocating insufficient memory for terminating null of the string
+ Make a call fail on ENOMEM
+ Allocate sufficient memory to terminate with null
+ Drop the redundant code
+ Fix memory leak
+ Fix the build issue with gperf
+ Fix missing closing bracket in FcStrIsAbsoluteFilename()
+ Update the issue tracker URL
+ Fix distcheck fail
+ Add .gitlab-ci.yml
+ Bump the libtool revision
+
+Alexander Larsson (3):
+ Add FcCacheAllocate() helper
+ Cache: Rewrite relocated paths in earlier
+ Cache: Remove alias_table
+
+Behdad Esfahbod (4):
+ Minor: fix warnings
+ Fix name scanning
+ Share name-mapping across instances
+ Use FT_HAS_COLOR
+
+Chris Lamb (1):
+ Ensure cache checksums are deterministic
+
+Matthieu Herrb (1):
+ FcCacheFindByStat(): fix checking of nanoseconds field.
+
+Tom Anderson (7):
+ Fix undefined-shift UBSAN errors
+ Use realfilename for FcOpen in _FcConfigParse
+ Add FONTCONFIG_SYSROOT environment variable
+ Fix CFI builds
+ Fix heap use-after-free
+ Return canonicalized paths from FcConfigRealFilename
+ Fix build with CFLAGS="-std=c11 -D_GNU_SOURCE"
2.13
diff --git a/chromium/third_party/fontconfig/src/configure.ac b/chromium/third_party/fontconfig/src/configure.ac
index 12cf2e94c7c..fb8af4671fe 100644
--- a/chromium/third_party/fontconfig/src/configure.ac
+++ b/chromium/third_party/fontconfig/src/configure.ac
@@ -33,7 +33,7 @@ dnl This is the package version number, not the shared library
dnl version. This same version number must appear in fontconfig/fontconfig.h
dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's
dnl not possible to extract the version number here from fontconfig.h
-AC_INIT([fontconfig], [2.13.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig])
+AC_INIT([fontconfig], [2.13.1], [https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new])
AM_INIT_AUTOMAKE([1.11 parallel-tests dist-bzip2])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@@ -72,11 +72,11 @@ dnl libtool versioning
dnl bump revision when fixing bugs
dnl bump current and age, reset revision to zero when adding APIs
dnl bump current, leave age, reset revision to zero when changing/removing APIS
-LIBT_CURRENT=12
-LIBT_REVISION=1
+LIBT_CURRENT=13
+LIBT_REVISION=0
AC_SUBST(LIBT_CURRENT)
AC_SUBST(LIBT_REVISION)
-LIBT_AGE=11
+LIBT_AGE=12
LIBT_VERSION_INFO="$LIBT_CURRENT:$LIBT_REVISION:$LIBT_AGE"
AC_SUBST(LIBT_VERSION_INFO)
diff --git a/chromium/third_party/fontconfig/src/doc/fcstring.fncs b/chromium/third_party/fontconfig/src/doc/fcstring.fncs
index 0412bbd1aed..d5ec043beeb 100644
--- a/chromium/third_party/fontconfig/src/doc/fcstring.fncs
+++ b/chromium/third_party/fontconfig/src/doc/fcstring.fncs
@@ -224,6 +224,18 @@ strings within the fontconfig library.
@@
@RET@ FcChar8 *
+@FUNC@ FcStrBuildFilename
+@TYPE1@ const FcChar8 * @ARG1@ path
+@TYPE2@ ...
+@PURPOSE@ Concatenate strings as a file path
+@DESC@
+Creates a filename from the given elements of strings as file paths
+and concatenate them with the appropriate file separator.
+Arguments must be null-terminated.
+This returns a newly-allocated memory which should be freed when no longer needed.
+@@
+
+@RET@ FcChar8 *
@FUNC@ FcStrDirname
@TYPE1@ const FcChar8 * @ARG1@ file
@PURPOSE@ directory part of filename
diff --git a/chromium/third_party/fontconfig/src/fontconfig/fontconfig.h b/chromium/third_party/fontconfig/src/fontconfig/fontconfig.h
index 045814f4d89..af870d0ef0d 100644
--- a/chromium/third_party/fontconfig/src/fontconfig/fontconfig.h
+++ b/chromium/third_party/fontconfig/src/fontconfig/fontconfig.h
@@ -53,7 +53,7 @@ typedef int FcBool;
#define FC_MAJOR 2
#define FC_MINOR 13
-#define FC_REVISION 0
+#define FC_REVISION 1
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
@@ -1077,6 +1077,10 @@ FcUtf16Len (const FcChar8 *string,
int *wchar);
FcPublic FcChar8 *
+FcStrBuildFilename (const FcChar8 *path,
+ ...);
+
+FcPublic FcChar8 *
FcStrDirname (const FcChar8 *file);
FcPublic FcChar8 *
diff --git a/chromium/third_party/fontconfig/src/src/Makefile.am b/chromium/third_party/fontconfig/src/src/Makefile.am
index 7a3557530b4..7b414dff014 100644
--- a/chromium/third_party/fontconfig/src/src/Makefile.am
+++ b/chromium/third_party/fontconfig/src/src/Makefile.am
@@ -111,10 +111,10 @@ fcobjshash.gperf: Makefile stamp-fcobjshash.gperf
stamp-fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
$(AM_V_GEN) $(CPP) -I$(top_srcdir) $(CPPFLAGS) $< | \
$(SED) 's/^ *//;s/ *, */,/' | \
- $(GREP) '^[^#]' | \
awk ' \
/CUT_OUT_BEGIN/ { no_write=1; next; }; \
/CUT_OUT_END/ { no_write=0; next; }; \
+ /^$$/||/^#/ { next; }; \
{ if (!no_write) print; next; }; \
' - > $@.tmp && \
mv -f $@.tmp fcobjshash.gperf && touch $@ || ( $(RM) $@.tmp && false )
diff --git a/chromium/third_party/fontconfig/src/src/fccache.c b/chromium/third_party/fontconfig/src/src/fccache.c
index c6201e4bf4e..2b604014e2b 100644
--- a/chromium/third_party/fontconfig/src/src/fccache.c
+++ b/chromium/third_party/fontconfig/src/src/fccache.c
@@ -110,6 +110,7 @@ FcDirCacheCreateUUID (FcChar8 *dir,
{
ret = FcFalse;
FcAtomicDeleteNew (atomic);
+ close (fd);
goto bail3;
}
uuid_unparse (uuid, out);
@@ -192,10 +193,13 @@ FcDirCacheReadUUID (FcChar8 *dir,
if ((fd = FcOpen ((char *) uuidname, O_RDONLY)) >= 0)
{
char suuid[37];
+ ssize_t len;
memset (suuid, 0, sizeof (suuid));
- if (read (fd, suuid, 36) > 0)
+ len = read (fd, suuid, 36);
+ if (len != -1)
{
+ suuid[len] = 0;
memset (uuid, 0, sizeof (uuid));
if (uuid_parse (suuid, uuid) == 0)
{
@@ -875,7 +879,7 @@ FcCacheOffsetsValid (FcCache *cache)
if (fs->nfont > (end - (char *) fs) / sizeof (FcPattern))
return FcFalse;
- if (fs->fonts != 0 && !FcIsEncodedOffset(fs->fonts))
+ if (!FcIsEncodedOffset(fs->fonts))
return FcFalse;
for (i = 0; i < fs->nfont; i++)
@@ -1347,9 +1351,9 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config)
#endif
FcDirCacheBasenameMD5 (dir, cache_base);
cache_hashed = FcStrBuildFilename (cache_dir, cache_base, NULL);
+ FcStrFree (cache_dir);
if (!cache_hashed)
return FcFalse;
- FcStrFree (cache_dir);
if (FcDebug () & FC_DBG_CACHE)
printf ("FcDirCacheWriteDir dir \"%s\" file \"%s\"\n",
diff --git a/chromium/third_party/fontconfig/src/src/fccfg.c b/chromium/third_party/fontconfig/src/src/fccfg.c
index 421b47c9c02..4a535819b96 100644
--- a/chromium/third_party/fontconfig/src/src/fccfg.c
+++ b/chromium/third_party/fontconfig/src/src/fccfg.c
@@ -748,12 +748,12 @@ FcConfigPromote (FcValue v, FcValue u, FcValuePromotionBuffer *buf)
v.u.l = FcLangSetPromote (v.u.s, buf);
v.type = FcTypeLangSet;
}
- else if (v.type == FcTypeVoid && u.type == FcTypeLangSet)
+ else if (buf && v.type == FcTypeVoid && u.type == FcTypeLangSet)
{
v.u.l = FcLangSetPromote (NULL, buf);
v.type = FcTypeLangSet;
}
- else if (v.type == FcTypeVoid && u.type == FcTypeCharSet)
+ else if (buf && v.type == FcTypeVoid && u.type == FcTypeCharSet)
{
v.u.c = FcCharSetPromote (buf);
v.type = FcTypeCharSet;
@@ -1832,11 +1832,13 @@ FcConfigSubstituteWithPat (FcConfig *config,
if (value[object])
{
FcConfigDel (&elt[object]->values, value[object]);
+ FcValueListDestroy (l);
break;
}
/* fall through ... */
case FcOpDeleteAll:
FcConfigPatternDel (p, r->u.edit->object);
+ FcValueListDestroy (l);
break;
default:
FcValueListDestroy (l);
@@ -2107,7 +2109,8 @@ FcConfigXdgCacheHome (void)
ret = malloc (len + 7 + 1);
if (ret)
{
- memcpy (ret, home, len);
+ if (home)
+ memcpy (ret, home, len);
memcpy (&ret[len], FC_DIR_SEPARATOR_S ".cache", 7);
ret[len + 7] = 0;
}
@@ -2134,7 +2137,8 @@ FcConfigXdgConfigHome (void)
ret = malloc (len + 8 + 1);
if (ret)
{
- memcpy (ret, home, len);
+ if (home)
+ memcpy (ret, home, len);
memcpy (&ret[len], FC_DIR_SEPARATOR_S ".config", 8);
ret[len + 8] = 0;
}
@@ -2161,7 +2165,8 @@ FcConfigXdgDataHome (void)
ret = malloc (len + 13 + 1);
if (ret)
{
- memcpy (ret, home, len);
+ if (home)
+ memcpy (ret, home, len);
memcpy (&ret[len], FC_DIR_SEPARATOR_S ".local" FC_DIR_SEPARATOR_S "share", 13);
ret[len + 13] = 0;
}
@@ -2202,17 +2207,19 @@ FcConfigFilename (const FcChar8 *url)
else
file = 0;
}
-
- path = FcConfigGetPath ();
- if (!path)
- return NULL;
- for (p = path; *p; p++)
+ else
{
- file = FcConfigFileExists (*p, url);
- if (file)
- break;
+ path = FcConfigGetPath ();
+ if (!path)
+ return NULL;
+ for (p = path; *p; p++)
+ {
+ file = FcConfigFileExists (*p, url);
+ if (file)
+ break;
+ }
+ FcConfigFreePath (path);
}
- FcConfigFreePath (path);
return file;
}
@@ -2611,12 +2618,13 @@ FcRuleSetAdd (FcRuleSet *rs,
switch (r->type)
{
case FcRuleTest:
- if (r->u.test &&
- r->u.test->kind == FcMatchDefault)
- r->u.test->kind = kind;
-
- if (n < r->u.test->object)
- n = r->u.test->object;
+ if (r->u.test)
+ {
+ if (r->u.test->kind == FcMatchDefault)
+ r->u.test->kind = kind;
+ if (n < r->u.test->object)
+ n = r->u.test->object;
+ }
break;
case FcRuleEdit:
if (n < r->u.edit->object)
diff --git a/chromium/third_party/fontconfig/src/src/fcfreetype.c b/chromium/third_party/fontconfig/src/src/fcfreetype.c
index 392410467b4..07978cf527e 100644
--- a/chromium/third_party/fontconfig/src/src/fcfreetype.c
+++ b/chromium/third_party/fontconfig/src/src/fcfreetype.c
@@ -2614,7 +2614,7 @@ GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags)
ftglue_stream_frame_exit( stream );
*stags = malloc(script_count * sizeof (FT_ULong));
- if (!stags)
+ if (!*stags)
return 0;
p = 0;
diff --git a/chromium/third_party/fontconfig/src/src/fcint.h b/chromium/third_party/fontconfig/src/src/fcint.h
index de78cd8c9f2..a9d075af85a 100644
--- a/chromium/third_party/fontconfig/src/src/fcint.h
+++ b/chromium/third_party/fontconfig/src/src/fcint.h
@@ -1283,10 +1283,6 @@ FcPrivate FcBool
FcStrIsAbsoluteFilename (const FcChar8 *s);
FcPrivate FcChar8 *
-FcStrBuildFilename (const FcChar8 *path,
- ...);
-
-FcPrivate FcChar8 *
FcStrLastSlash (const FcChar8 *path);
FcPrivate FcChar32
diff --git a/chromium/third_party/fontconfig/src/src/fclist.c b/chromium/third_party/fontconfig/src/src/fclist.c
index d7e8fc09106..494bdead6d7 100644
--- a/chromium/third_party/fontconfig/src/src/fclist.c
+++ b/chromium/third_party/fontconfig/src/src/fclist.c
@@ -568,6 +568,9 @@ FcFontSetList (FcConfig *config,
free (bucket);
}
+ if (destroy_os)
+ FcObjectSetDestroy (os);
+
return ret;
bail2:
diff --git a/chromium/third_party/fontconfig/src/src/fcmatch.c b/chromium/third_party/fontconfig/src/src/fcmatch.c
index cab38ca85f2..c3d2b8ad338 100644
--- a/chromium/third_party/fontconfig/src/src/fcmatch.c
+++ b/chromium/third_party/fontconfig/src/src/fcmatch.c
@@ -814,11 +814,14 @@ FcFontSetMatchInternal (FcFontSet **sets,
len = (p - s);
}
x = malloc (sizeof (char) * (len + 1));
- strcpy (x, s);
- if (FcObjectFromName (x) > 0)
- FcObjectSetAdd (os, x);
- s = p + 1;
- free (x);
+ if (x)
+ {
+ strcpy (x, s);
+ if (FcObjectFromName (x) > 0)
+ FcObjectSetAdd (os, x);
+ s = p + 1;
+ free (x);
+ }
}
free (ss);
}
diff --git a/chromium/third_party/fontconfig/src/src/fcname.c b/chromium/third_party/fontconfig/src/src/fcname.c
index c9320aeefcc..711bb9b2466 100644
--- a/chromium/third_party/fontconfig/src/src/fcname.c
+++ b/chromium/third_party/fontconfig/src/src/fcname.c
@@ -334,8 +334,8 @@ FcNameConvert (FcType type, FcChar8 *string)
size_t len = strlen ((const char *) string);
int si, ei;
- sc = malloc (len);
- ec = malloc (len);
+ sc = malloc (len + 1);
+ ec = malloc (len + 1);
if (sc && ec && sscanf ((char *) string, "[%s %[^]]]", sc, ec) == 2)
{
if (FcNameConstant ((const FcChar8 *) sc, &si) &&
diff --git a/chromium/third_party/fontconfig/src/src/fcptrlist.c b/chromium/third_party/fontconfig/src/src/fcptrlist.c
index a0688dda271..bb8883289d2 100644
--- a/chromium/third_party/fontconfig/src/src/fcptrlist.c
+++ b/chromium/third_party/fontconfig/src/src/fcptrlist.c
@@ -143,6 +143,8 @@ FcPtrListIterAdd (FcPtrList *list,
return FcFalse;
e = (FcPtrListEntry *) malloc (sizeof (FcPtrListEntry));
+ if (!e)
+ return FcFalse;
e->data = data;
if (priv->entry)
diff --git a/chromium/third_party/fontconfig/src/src/fcstat.c b/chromium/third_party/fontconfig/src/src/fcstat.c
index f6e1aaab4ec..5aa1643426c 100644
--- a/chromium/third_party/fontconfig/src/src/fcstat.c
+++ b/chromium/third_party/fontconfig/src/src/fcstat.c
@@ -218,6 +218,14 @@ FcScandir (const char *dirp,
size_t dentlen = FcPtrToOffset (dent, dent->d_name) + strlen (dent->d_name) + 1;
dentlen = ((dentlen + ALIGNOF_VOID_P - 1) & ~(ALIGNOF_VOID_P - 1));
p = (struct dirent *) malloc (dentlen);
+ if (!p)
+ {
+ free_dirent (dlist);
+ closedir (d);
+ errno = ENOMEM;
+
+ return -1;
+ }
memcpy (p, dent, dentlen);
if ((n + 1) >= lsize)
{
@@ -225,6 +233,7 @@ FcScandir (const char *dirp,
dlp = (struct dirent **) realloc (dlist, sizeof (struct dirent *) * lsize);
if (!dlp)
{
+ free (p);
free_dirent (dlist);
closedir (d);
errno = ENOMEM;
diff --git a/chromium/third_party/fontconfig/src/src/fcstr.c b/chromium/third_party/fontconfig/src/src/fcstr.c
index 4d33ea5c8b8..4247c85f4a5 100644
--- a/chromium/third_party/fontconfig/src/src/fcstr.c
+++ b/chromium/third_party/fontconfig/src/src/fcstr.c
@@ -872,7 +872,7 @@ FcStrIsAbsoluteFilename (const FcChar8 *s)
{
#ifdef _WIN32
if (*s == '\\' ||
- (isalpha (*s) && s[1] == ':' && (s[2] == '/' || s[2] == '\\'))
+ (isalpha (*s) && s[1] == ':' && (s[2] == '/' || s[2] == '\\')))
return FcTrue;
#endif
return *s == '/';
@@ -953,7 +953,7 @@ FcStrCopyFilename (const FcChar8 *s)
if (!home)
return NULL;
size = strlen ((char *) home) + strlen ((char *) s);
- full = (FcChar8 *) malloc (size);
+ full = (FcChar8 *) malloc (size + 1);
if (!full)
return NULL;
strcpy ((char *) full, (char *) home);
diff --git a/chromium/third_party/fontconfig/src/src/fcxml.c b/chromium/third_party/fontconfig/src/src/fcxml.c
index 4f984a74ee9..77975028fae 100644
--- a/chromium/third_party/fontconfig/src/src/fcxml.c
+++ b/chromium/third_party/fontconfig/src/src/fcxml.c
@@ -22,9 +22,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef _GNU_SOURCE
-#undef _GNU_SOURCE /* To use the POSIX version of strerror_r */
-#endif
#include <string.h>
#include "fcint.h"
#include <fcntl.h>
@@ -649,7 +646,6 @@ FcTypecheckValue (FcConfigParse *parse, FcType value, FcType type)
{
if ((value == FcTypeLangSet && type == FcTypeString) ||
(value == FcTypeString && type == FcTypeLangSet) ||
- (value == FcTypeInteger && type == FcTypeRange) ||
(value == FcTypeDouble && type == FcTypeRange))
return;
if (type == FcTypeUnknown)
@@ -1838,6 +1834,8 @@ FcParseAlias (FcConfigParse *parse)
!def)
{
FcExprDestroy (family);
+ if (rule)
+ FcRuleDestroy (rule);
return;
}
else
@@ -2190,6 +2188,7 @@ FcParseCacheDir (FcConfigParse *parse)
if (!data)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
+ data = prefix;
goto bail;
}
if (prefix)
@@ -2201,7 +2200,7 @@ FcParseCacheDir (FcConfigParse *parse)
if (!p)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
- data = prefix;
+ FcStrFree (prefix);
goto bail;
}
prefix = p;
@@ -2233,6 +2232,7 @@ FcParseCacheDir (FcConfigParse *parse)
else if (strcmp ((const char *) data, "WINDOWSTEMPDIR_FONTCONFIG_CACHE") == 0)
{
int rc;
+
FcStrFree (data);
data = malloc (1000);
if (!data)
@@ -3471,8 +3471,7 @@ _FcConfigParse (FcConfig *config,
char ebuf[BUFSIZ+1];
#if HAVE_STRERROR_R
- int x FC_UNUSED;
- x = strerror_r (errno_, ebuf, BUFSIZ); /* make sure we use the POSIX version of strerror_r */
+ strerror_r (errno_, ebuf, BUFSIZ);
#elif HAVE_STRERROR
char *tmp = strerror (errno_);
size_t len = strlen (tmp);
diff --git a/chromium/third_party/icu/BUILD.gn b/chromium/third_party/icu/BUILD.gn
index f69d50031f7..c782db0c3ef 100644
--- a/chromium/third_party/icu/BUILD.gn
+++ b/chromium/third_party/icu/BUILD.gn
@@ -96,6 +96,8 @@ config("icu_code") {
# certain preprocessor defines are set.
# unistr.cpp also has an unused function for non-component builds.
"-Wno-unused-function",
+ # putil.cpp contains unused variables when building for iOS simulators.
+ "-Wno-unused-variable",
]
}
if (is_clang || is_linux || is_android) {
diff --git a/chromium/third_party/icu/README.chromium b/chromium/third_party/icu/README.chromium
index 092245c4222..287215fc19d 100644
--- a/chromium/third_party/icu/README.chromium
+++ b/chromium/third_party/icu/README.chromium
@@ -77,7 +77,9 @@ Pre-built data files are generated and checked in with the following steps
ix) Repeat ii) and iii) for iOS to get ios/icudtl.dat
- x) scripts/clean_up_data_source.sh
+ x) Repeat ii) and iii) for Flutter to get flutter/icudtl.dat
+
+ xi) scripts/clean_up_data_source.sh
This reverts the result of trim_data.sh and patch_locale.sh and
make the tree ready for committing updated ICU data files for
diff --git a/chromium/third_party/icu/cast/icudtl.dat b/chromium/third_party/icu/cast/icudtl.dat
index 7c3cefcbb88..0c0158c1979 100644
--- a/chromium/third_party/icu/cast/icudtl.dat
+++ b/chromium/third_party/icu/cast/icudtl.dat
Binary files differ
diff --git a/chromium/third_party/icu/cast/patch_locale.sh b/chromium/third_party/icu/cast/patch_locale.sh
index e36dab3f66c..91ff109b2c9 100755
--- a/chromium/third_party/icu/cast/patch_locale.sh
+++ b/chromium/third_party/icu/cast/patch_locale.sh
@@ -50,8 +50,17 @@ do
/^ [cC]urrency(Map|Meta|Spacing|UnitPatterns)\{$/, /^ \}$/ p
/^ Version\{.*\}$/p
/^\}$/p' $i
+
+ # Delete empty blocks. Otherwise, locale fallback fails.
+ # See crbug.com/791318 and crbug.com/870338 .
+ sed -r -i \
+ '/^ Currenc(ie.*|yPlurals)\{$/ {
+ N
+ /^ Currenc(ie.*|yPlurals)\{\n \}/ d
+ }' "${i}"
done
+
# Chrome on Android is not localized to the following languages and we
# have to minimize the locale data for them.
EXTRA_LANGUAGES="bn et gu kn ml mr ms ta te"
diff --git a/chromium/third_party/icu/common/icudtb.dat b/chromium/third_party/icu/common/icudtb.dat
index 0bca8014268..470b9a34ba5 100644
--- a/chromium/third_party/icu/common/icudtb.dat
+++ b/chromium/third_party/icu/common/icudtb.dat
Binary files differ
diff --git a/chromium/third_party/icu/common/icudtl.dat b/chromium/third_party/icu/common/icudtl.dat
index 46da5c0af2e..4ba503bbf19 100644
--- a/chromium/third_party/icu/common/icudtl.dat
+++ b/chromium/third_party/icu/common/icudtl.dat
Binary files differ
diff --git a/chromium/third_party/icu/flutter/flutter-removed-resources.txt b/chromium/third_party/icu/flutter/flutter-removed-resources.txt
new file mode 100644
index 00000000000..b600da1c965
--- /dev/null
+++ b/chromium/third_party/icu/flutter/flutter-removed-resources.txt
@@ -0,0 +1,427 @@
+coll/*
+zone/*
+curr/*
+lang/*
+rbnf/*
+region/*
+translit/*
+unit/*
+
+# lang/*
+af.res
+ak.res
+am.res
+an.res
+ar.res
+ar_001.res
+ar_AE.res
+ar_BH.res
+ar_DJ.res
+ar_DZ.res
+ar_EG.res
+ar_EH.res
+ar_ER.res
+ar_IL.res
+ar_IQ.res
+ar_JO.res
+ar_KM.res
+ar_KW.res
+ar_LB.res
+ar_LY.res
+ar_MA.res
+ar_MR.res
+ar_OM.res
+ar_PS.res
+ar_QA.res
+ar_SA.res
+ar_SD.res
+ar_SO.res
+ar_SS.res
+ar_SY.res
+ar_TD.res
+ar_TN.res
+ar_YE.res
+ast.res
+az.res
+be.res
+bem.res
+bg.res
+bn.res
+br.res
+bs.res
+ca.res
+ckb.res
+cs.res
+cy.res
+da.res
+de.res
+de_AT.res
+de_BE.res
+de_CH.res
+de_IT.res
+de_LI.res
+de_LU.res
+ee.res
+el.res
+en.res
+en_001.res
+en_150.res
+en_AG.res
+en_AI.res
+en_AS.res
+en_AT.res
+en_AU.res
+en_BB.res
+en_BE.res
+en_BI.res
+en_BM.res
+en_BS.res
+en_BW.res
+en_BZ.res
+en_CA.res
+en_CC.res
+en_CH.res
+en_CK.res
+en_CM.res
+en_CX.res
+en_CY.res
+en_DE.res
+en_DG.res
+en_DK.res
+en_DM.res
+en_ER.res
+en_FI.res
+en_FJ.res
+en_FK.res
+en_FM.res
+en_GB.res
+en_GD.res
+en_GG.res
+en_GH.res
+en_GI.res
+en_GM.res
+en_GU.res
+en_GY.res
+en_HK.res
+en_IE.res
+en_IL.res
+en_IM.res
+en_IN.res
+en_IO.res
+en_JE.res
+en_JM.res
+en_KE.res
+en_KI.res
+en_KN.res
+en_KY.res
+en_LC.res
+en_LR.res
+en_LS.res
+en_MG.res
+en_MH.res
+en_MO.res
+en_MP.res
+en_MS.res
+en_MT.res
+en_MU.res
+en_MW.res
+en_MY.res
+en_NA.res
+en_NF.res
+en_NG.res
+en_NL.res
+en_NR.res
+en_NU.res
+en_NZ.res
+en_PG.res
+en_PH.res
+en_PK.res
+en_PN.res
+en_PR.res
+en_PW.res
+en_RW.res
+en_SB.res
+en_SC.res
+en_SD.res
+en_SE.res
+en_SG.res
+en_SH.res
+en_SI.res
+en_SL.res
+en_SS.res
+en_SX.res
+en_SZ.res
+en_TC.res
+en_TK.res
+en_TO.res
+en_TT.res
+en_TV.res
+en_TZ.res
+en_UG.res
+en_UM.res
+en_US.res
+en_US_POSIX.res
+en_VC.res
+en_VG.res
+en_VI.res
+en_VU.res
+en_WS.res
+en_ZA.res
+en_ZM.res
+en_ZW.res
+eo.res
+es.res
+es_419.res
+es_AR.res
+es_BO.res
+es_BR.res
+es_BZ.res
+es_CL.res
+es_CO.res
+es_CR.res
+es_CU.res
+es_DO.res
+es_EA.res
+es_EC.res
+es_ES.res
+es_GQ.res
+es_GT.res
+es_HN.res
+es_IC.res
+es_MX.res
+es_NI.res
+es_PA.res
+es_PE.res
+es_PH.res
+es_PR.res
+es_PY.res
+es_SV.res
+es_US.res
+es_UY.res
+es_VE.res
+et.res
+eu.res
+fa.res
+fi.res
+fil.res
+fo.res
+fr.res
+fr_BE.res
+fr_BF.res
+fr_BI.res
+fr_BJ.res
+fr_BL.res
+fr_CA.res
+fr_CD.res
+fr_CF.res
+fr_CG.res
+fr_CH.res
+fr_CI.res
+fr_CM.res
+fr_DJ.res
+fr_DZ.res
+fr_FR.res
+fr_GA.res
+fr_GF.res
+fr_GN.res
+fr_GP.res
+fr_GQ.res
+fr_HT.res
+fr_KM.res
+fr_LU.res
+fr_MA.res
+fr_MC.res
+fr_MF.res
+fr_MG.res
+fr_ML.res
+fr_MQ.res
+fr_MR.res
+fr_MU.res
+fr_NC.res
+fr_NE.res
+fr_PF.res
+fr_PM.res
+fr_RE.res
+fr_RW.res
+fr_SC.res
+fr_SN.res
+fr_SY.res
+fr_TD.res
+fr_TG.res
+fr_TN.res
+fr_VU.res
+fr_WF.res
+fr_YT.res
+ga.res
+gl.res
+gu.res
+ha.res
+haw.res
+he.res
+hi.res
+hr.res
+hu.res
+hy.res
+id.res
+ig.res
+in.res
+is.res
+it.res
+it_CH.res
+iw.res
+ja.res
+ka.res
+kk.res
+km.res
+kn.res
+ko.res
+ku.res
+ky.res
+lg.res
+ln.res
+lo.res
+lt.res
+lv.res
+mfe.res
+mg.res
+mk.res
+ml.res
+mn.res
+mo.res
+mr.res
+ms.res
+mt.res
+my.res
+nb.res
+ne.res
+nl.res
+nl_AW.res
+nl_BE.res
+nl_BQ.res
+nl_CW.res
+nl_NL.res
+nl_SR.res
+nl_SX.res
+nn.res
+no.res
+nyn.res
+om.res
+or.res
+pa.res
+pl.res
+ps.res
+pt.res
+pt_AO.res
+pt_BR.res
+pt_CH.res
+pt_CV.res
+pt_GQ.res
+pt_GW.res
+pt_LU.res
+pt_MO.res
+pt_MZ.res
+pt_PT.res
+pt_ST.res
+pt_TL.res
+rm.res
+rn.res
+ro.res
+ro_MD.res
+root.res
+ru.res
+ru_BY.res
+ru_KG.res
+ru_KZ.res
+ru_MD.res
+ru_RU.res
+ru_UA.res
+rw.res
+sh.res
+si.res
+sk.res
+sl.res
+sn.res
+so.res
+sq.res
+sr.res
+sr_Latn.res
+sv.res
+sw.res
+ta.res
+te.res
+tg.res
+th.res
+ti.res
+tl.res
+to.res
+tr.res
+uk.res
+ur.res
+uz.res
+vi.res
+wa.res
+yo.res
+zh.res
+zh_CN.res
+zh_HK.res
+zh_Hans.res
+zh_Hans_CN.res
+zh_Hans_SG.res
+zh_Hant.res
+zh_Hant_HK.res
+zh_Hant_TW.res
+zh_SG.res
+zh_TW.res
+zu.res
+
+# misc/ (note mising *, only partly removed)
+currencyNumericCodes.res
+dayPeriods.res
+genderList.res
+keyTypeData.res
+metaZones.res
+metadata.res
+numberingSystems.res
+plurals.res
+supplementalData.res
+timezoneTypes.res
+windowsZones.res
+zoneinfo64.res
+
+# *.cnv
+big5-html.cnv
+euc-jp-html.cnv
+euc-kr-html.cnv
+gb18030.cnv
+ibm866-html.cnv
+iso-8859-10-html.cnv
+iso-8859-13-html.cnv
+iso-8859-14-html.cnv
+iso-8859-15-html.cnv
+iso-8859-16-html.cnv
+iso-8859-2-html.cnv
+iso-8859-3-html.cnv
+iso-8859-4-html.cnv
+iso-8859-5-html.cnv
+iso-8859-6-html.cnv
+iso-8859-7-html.cnv
+iso-8859-8-html.cnv
+koi8-r-html.cnv
+koi8-u-html.cnv
+macintosh-html.cnv
+shift_jis-html.cnv
+windows-1250-html.cnv
+windows-1251-html.cnv
+windows-1252-html.cnv
+windows-1253-html.cnv
+windows-1254-html.cnv
+windows-1255-html.cnv
+windows-1256-html.cnv
+windows-1257-html.cnv
+windows-1258-html.cnv
+windows-874-html.cnv
+windows-936-2000.cnv
+x-mac-cyrillic-html.cnv
+
+# other
+confusables.cfu
diff --git a/chromium/third_party/icu/flutter/icudtl.dat b/chromium/third_party/icu/flutter/icudtl.dat
new file mode 100644
index 00000000000..91d0b16fcfd
--- /dev/null
+++ b/chromium/third_party/icu/flutter/icudtl.dat
Binary files differ
diff --git a/chromium/third_party/icu/scripts/copy_data.sh b/chromium/third_party/icu/scripts/copy_data.sh
index a8def76e4f0..e83496e9e26 100755
--- a/chromium/third_party/icu/scripts/copy_data.sh
+++ b/chromium/third_party/icu/scripts/copy_data.sh
@@ -54,6 +54,21 @@ function copy_cast {
echo "Done with copying pre-built ICU data file for $1."
}
+function copy_flutter {
+ echo "Copying icudtl.dat for Flutter"
+
+ cp "data/out/tmp/icudt${VERSION}l.dat" "${TOPSRC}/flutter/icudt${VERSION}l.dat"
+
+ echo "Removing unused resources from icudtl.dat for Flutter"
+
+ LD_LIBRARY_PATH=lib/ bin/icupkg -r \
+ "${TOPSRC}/flutter/flutter-removed-resources.txt" \
+ "${TOPSRC}/flutter/icudt${VERSION}l.dat"
+ mv "${TOPSRC}/flutter/icudt${VERSION}l.dat" "${TOPSRC}/flutter/icudtl.dat"
+
+ echo "Done with copying pre-built ICU data file for Flutter."
+}
+
case "$1" in
"common")
copy_common
@@ -67,4 +82,7 @@ case "$1" in
"cast")
copy_cast Cast cast
;;
+ "flutter")
+ copy_flutter
+ ;;
esac
diff --git a/chromium/third_party/icu/scripts/make_data_all.sh b/chromium/third_party/icu/scripts/make_data_all.sh
index 557fbdc9f14..a1c2bcc83b8 100755
--- a/chromium/third_party/icu/scripts/make_data_all.sh
+++ b/chromium/third_party/icu/scripts/make_data_all.sh
@@ -16,5 +16,6 @@ $ICUROOT/scripts/copy_data.sh android
$ICUROOT/ios/patch_locale.sh
$ICUROOT/scripts/make_data.sh
$ICUROOT/scripts/copy_data.sh ios
+$ICUROOT/scripts/copy_data.sh flutter
$ICUROOT/scripts/clean_up_data_source.sh
diff --git a/chromium/third_party/skia/include/gpu/gl/GrGLExtensions.h b/chromium/third_party/skia/include/gpu/gl/GrGLExtensions.h
index 73e509798e2..6a41ed9164d 100644
--- a/chromium/third_party/skia/include/gpu/gl/GrGLExtensions.h
+++ b/chromium/third_party/skia/include/gpu/gl/GrGLExtensions.h
@@ -43,10 +43,10 @@ public:
* NULL if on desktop GL with version 3.0 or higher. Otherwise it will fail.
*/
bool init(GrGLStandard standard,
- GrGLFunction<GrGLGetStringProc> getString,
- GrGLFunction<GrGLGetStringiProc> getStringi,
- GrGLFunction<GrGLGetIntegervProc> getIntegerv,
- GrGLFunction<GrEGLQueryStringProc> queryString = nullptr,
+ GrGLFunction<GrGLGetStringFn> getString,
+ GrGLFunction<GrGLGetStringiFn> getStringi,
+ GrGLFunction<GrGLGetIntegervFn> getIntegerv,
+ GrGLFunction<GrEGLQueryStringFn> queryString = nullptr,
GrEGLDisplay eglDisplay = nullptr);
bool isInitialized() const { return fInitialized; }
diff --git a/chromium/third_party/skia/include/gpu/gl/GrGLFunctions.h b/chromium/third_party/skia/include/gpu/gl/GrGLFunctions.h
index 15dc154a019..bbb18513165 100644
--- a/chromium/third_party/skia/include/gpu/gl/GrGLFunctions.h
+++ b/chromium/third_party/skia/include/gpu/gl/GrGLFunctions.h
@@ -9,276 +9,280 @@
#ifndef GrGLFunctions_DEFINED
#define GrGLFunctions_DEFINED
-#include "GrGLTypes.h"
+#include <cstring>
#include "../private/SkTLogic.h"
+#include "GrGLTypes.h"
-#include <cstring>
extern "C" {
///////////////////////////////////////////////////////////////////////////////
-typedef GrGLvoid (* GrGLActiveTextureProc)(GrGLenum texture);
-typedef GrGLvoid (* GrGLAttachShaderProc)(GrGLuint program, GrGLuint shader);
-typedef GrGLvoid (* GrGLBeginQueryProc)(GrGLenum target, GrGLuint id);
-typedef GrGLvoid (* GrGLBindAttribLocationProc)(GrGLuint program, GrGLuint index, const char* name);
-typedef GrGLvoid (* GrGLBindBufferProc)(GrGLenum target, GrGLuint buffer);
-typedef GrGLvoid (* GrGLBindFramebufferProc)(GrGLenum target, GrGLuint framebuffer);
-typedef GrGLvoid (* GrGLBindRenderbufferProc)(GrGLenum target, GrGLuint renderbuffer);
-typedef GrGLvoid (* GrGLBindTextureProc)(GrGLenum target, GrGLuint texture);
-typedef GrGLvoid (* GrGLBindFragDataLocationProc)(GrGLuint program, GrGLuint colorNumber, const GrGLchar* name);
-typedef GrGLvoid (* GrGLBindFragDataLocationIndexedProc)(GrGLuint program, GrGLuint colorNumber, GrGLuint index, const GrGLchar * name);
-typedef GrGLvoid (* GrGLBindVertexArrayProc)(GrGLuint array);
-typedef GrGLvoid (* GrGLBlendBarrierProc)();
-typedef GrGLvoid (* GrGLBlendColorProc)(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
-typedef GrGLvoid (* GrGLBlendEquationProc)(GrGLenum mode);
-typedef GrGLvoid (* GrGLBlendFuncProc)(GrGLenum sfactor, GrGLenum dfactor);
-typedef GrGLvoid (* GrGLBlitFramebufferProc)(GrGLint srcX0, GrGLint srcY0, GrGLint srcX1, GrGLint srcY1, GrGLint dstX0, GrGLint dstY0, GrGLint dstX1, GrGLint dstY1, GrGLbitfield mask, GrGLenum filter);
-typedef GrGLvoid (* GrGLBufferDataProc)(GrGLenum target, GrGLsizeiptr size, const GrGLvoid* data, GrGLenum usage);
-typedef GrGLvoid (* GrGLBufferSubDataProc)(GrGLenum target, GrGLintptr offset, GrGLsizeiptr size, const GrGLvoid* data);
-typedef GrGLenum (* GrGLCheckFramebufferStatusProc)(GrGLenum target);
-typedef GrGLvoid (* GrGLClearProc)(GrGLbitfield mask);
-typedef GrGLvoid (* GrGLClearColorProc)(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
-typedef GrGLvoid (* GrGLClearStencilProc)(GrGLint s);
-typedef GrGLvoid (* GrGLClearTexImageProc)(GrGLuint texture, GrGLint level, GrGLenum format, GrGLenum type,const GrGLvoid * data);
-typedef GrGLvoid (* GrGLClearTexSubImageProc)(GrGLuint texture, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLint zoffset, GrGLsizei width, GrGLsizei height, GrGLsizei depth, GrGLenum format, GrGLenum type,const GrGLvoid * data);
-typedef GrGLvoid (* GrGLColorMaskProc)(GrGLboolean red, GrGLboolean green, GrGLboolean blue, GrGLboolean alpha);
-typedef GrGLvoid (* GrGLCompileShaderProc)(GrGLuint shader);
-typedef GrGLvoid (* GrGLCompressedTexImage2DProc)(GrGLenum target, GrGLint level, GrGLenum internalformat, GrGLsizei width, GrGLsizei height, GrGLint border, GrGLsizei imageSize, const GrGLvoid* data);
-typedef GrGLvoid (* GrGLCompressedTexSubImage2DProc)(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLsizei imageSize, const GrGLvoid* data);
-typedef GrGLvoid (* GrGLCopyTexSubImage2DProc)(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
-typedef GrGLuint (* GrGLCreateProgramProc)();
-typedef GrGLuint (* GrGLCreateShaderProc)(GrGLenum type);
-typedef GrGLvoid (* GrGLCullFaceProc)(GrGLenum mode);
-typedef GrGLvoid (* GrGLDeleteBuffersProc)(GrGLsizei n, const GrGLuint* buffers);
-typedef GrGLvoid (* GrGLDeleteFramebuffersProc)(GrGLsizei n, const GrGLuint *framebuffers);
-typedef GrGLvoid (* GrGLDeleteProgramProc)(GrGLuint program);
-typedef GrGLvoid (* GrGLDeleteQueriesProc)(GrGLsizei n, const GrGLuint *ids);
-typedef GrGLvoid (* GrGLDeleteRenderbuffersProc)(GrGLsizei n, const GrGLuint *renderbuffers);
-typedef GrGLvoid (* GrGLDeleteShaderProc)(GrGLuint shader);
-typedef GrGLvoid (* GrGLDeleteTexturesProc)(GrGLsizei n, const GrGLuint* textures);
-typedef GrGLvoid (* GrGLDeleteVertexArraysProc)(GrGLsizei n, const GrGLuint *arrays);
-typedef GrGLvoid (* GrGLDepthMaskProc)(GrGLboolean flag);
-typedef GrGLvoid (* GrGLDisableProc)(GrGLenum cap);
-typedef GrGLvoid (* GrGLDisableVertexAttribArrayProc)(GrGLuint index);
-typedef GrGLvoid (* GrGLDrawArraysProc)(GrGLenum mode, GrGLint first, GrGLsizei count);
-typedef GrGLvoid (* GrGLDrawArraysInstancedProc)(GrGLenum mode, GrGLint first, GrGLsizei count, GrGLsizei primcount);
-typedef GrGLvoid (* GrGLDrawArraysIndirectProc)(GrGLenum mode, const GrGLvoid* indirect);
-typedef GrGLvoid (* GrGLDrawBufferProc)(GrGLenum mode);
-typedef GrGLvoid (* GrGLDrawBuffersProc)(GrGLsizei n, const GrGLenum* bufs);
-typedef GrGLvoid (* GrGLDrawElementsProc)(GrGLenum mode, GrGLsizei count, GrGLenum type, const GrGLvoid* indices);
-typedef GrGLvoid (* GrGLDrawElementsInstancedProc)(GrGLenum mode, GrGLsizei count, GrGLenum type, const GrGLvoid *indices, GrGLsizei primcount);
-typedef GrGLvoid (* GrGLDrawElementsIndirectProc)(GrGLenum mode, GrGLenum type, const GrGLvoid* indirect);
-typedef GrGLvoid (* GrGLDrawRangeElementsProc)(GrGLenum mode, GrGLuint start, GrGLuint end, GrGLsizei count, GrGLenum type, const GrGLvoid* indices);
-typedef GrGLvoid (* GrGLEnableProc)(GrGLenum cap);
-typedef GrGLvoid (* GrGLEnableVertexAttribArrayProc)(GrGLuint index);
-typedef GrGLvoid (* GrGLEndQueryProc)(GrGLenum target);
-typedef GrGLvoid (* GrGLFinishProc)();
-typedef GrGLvoid (* GrGLFlushProc)();
-typedef GrGLvoid (* GrGLFlushMappedBufferRangeProc)(GrGLenum target, GrGLintptr offset, GrGLsizeiptr length);
-typedef GrGLvoid (* GrGLFramebufferRenderbufferProc)(GrGLenum target, GrGLenum attachment, GrGLenum renderbuffertarget, GrGLuint renderbuffer);
-typedef GrGLvoid (* GrGLFramebufferTexture2DProc)(GrGLenum target, GrGLenum attachment, GrGLenum textarget, GrGLuint texture, GrGLint level);
-typedef GrGLvoid (* GrGLFramebufferTexture2DMultisampleProc)(GrGLenum target, GrGLenum attachment, GrGLenum textarget, GrGLuint texture, GrGLint level, GrGLsizei samples);
-typedef GrGLvoid (* GrGLFrontFaceProc)(GrGLenum mode);
-typedef GrGLvoid (* GrGLGenBuffersProc)(GrGLsizei n, GrGLuint* buffers);
-typedef GrGLvoid (* GrGLGenFramebuffersProc)(GrGLsizei n, GrGLuint *framebuffers);
-typedef GrGLvoid (* GrGLGenerateMipmapProc)(GrGLenum target);
-typedef GrGLvoid (* GrGLGenQueriesProc)(GrGLsizei n, GrGLuint *ids);
-typedef GrGLvoid (* GrGLGenRenderbuffersProc)(GrGLsizei n, GrGLuint *renderbuffers);
-typedef GrGLvoid (* GrGLGenTexturesProc)(GrGLsizei n, GrGLuint* textures);
-typedef GrGLvoid (* GrGLGenVertexArraysProc)(GrGLsizei n, GrGLuint *arrays);
-typedef GrGLvoid (* GrGLGetBufferParameterivProc)(GrGLenum target, GrGLenum pname, GrGLint* params);
-typedef GrGLenum (* GrGLGetErrorProc)();
-typedef GrGLvoid (* GrGLGetFramebufferAttachmentParameterivProc)(GrGLenum target, GrGLenum attachment, GrGLenum pname, GrGLint* params);
-typedef GrGLvoid (* GrGLGetIntegervProc)(GrGLenum pname, GrGLint* params);
-typedef GrGLvoid (* GrGLGetMultisamplefvProc)(GrGLenum pname, GrGLuint index, GrGLfloat* val);
-typedef GrGLvoid (* GrGLGetProgramBinaryProc)(GrGLuint program, GrGLsizei bufsize, GrGLsizei* length, GrGLenum *binaryFormat, void *binary);
-typedef GrGLvoid (* GrGLGetProgramInfoLogProc)(GrGLuint program, GrGLsizei bufsize, GrGLsizei* length, char* infolog);
-typedef GrGLvoid (* GrGLGetProgramivProc)(GrGLuint program, GrGLenum pname, GrGLint* params);
-typedef GrGLvoid (* GrGLGetQueryivProc)(GrGLenum GLtarget, GrGLenum pname, GrGLint *params);
-typedef GrGLvoid (* GrGLGetQueryObjecti64vProc)(GrGLuint id, GrGLenum pname, GrGLint64 *params);
-typedef GrGLvoid (* GrGLGetQueryObjectivProc)(GrGLuint id, GrGLenum pname, GrGLint *params);
-typedef GrGLvoid (* GrGLGetQueryObjectui64vProc)(GrGLuint id, GrGLenum pname, GrGLuint64 *params);
-typedef GrGLvoid (* GrGLGetQueryObjectuivProc)(GrGLuint id, GrGLenum pname, GrGLuint *params);
-typedef GrGLvoid (* GrGLGetRenderbufferParameterivProc)(GrGLenum target, GrGLenum pname, GrGLint* params);
-typedef GrGLvoid (* GrGLGetShaderInfoLogProc)(GrGLuint shader, GrGLsizei bufsize, GrGLsizei* length, char* infolog);
-typedef GrGLvoid (* GrGLGetShaderivProc)(GrGLuint shader, GrGLenum pname, GrGLint* params);
-typedef GrGLvoid (* GrGLGetShaderPrecisionFormatProc)(GrGLenum shadertype, GrGLenum precisiontype, GrGLint *range, GrGLint *precision);
-typedef const GrGLubyte* (* GrGLGetStringProc)(GrGLenum name);
-typedef const GrGLubyte* (* GrGLGetStringiProc)(GrGLenum name, GrGLuint index);
-typedef GrGLvoid (* GrGLGetTexLevelParameterivProc)(GrGLenum target, GrGLint level, GrGLenum pname, GrGLint* params);
-typedef GrGLint (* GrGLGetUniformLocationProc)(GrGLuint program, const char* name);
-typedef GrGLvoid (* GrGLInsertEventMarkerProc)(GrGLsizei length, const char* marker);
-typedef GrGLvoid (* GrGLInvalidateBufferDataProc)(GrGLuint buffer);
-typedef GrGLvoid (* GrGLInvalidateBufferSubDataProc)(GrGLuint buffer, GrGLintptr offset, GrGLsizeiptr length);
-typedef GrGLvoid (* GrGLInvalidateFramebufferProc)(GrGLenum target, GrGLsizei numAttachments, const GrGLenum *attachments);
-typedef GrGLvoid (* GrGLInvalidateSubFramebufferProc)(GrGLenum target, GrGLsizei numAttachments, const GrGLenum *attachments, GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
-typedef GrGLvoid (* GrGLInvalidateTexImageProc)(GrGLuint texture, GrGLint level);
-typedef GrGLvoid (* GrGLInvalidateTexSubImageProc)(GrGLuint texture, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLint zoffset, GrGLsizei width, GrGLsizei height, GrGLsizei depth);
-typedef GrGLboolean (* GrGLIsTextureProc)(GrGLuint texture);
-typedef GrGLvoid (* GrGLLineWidthProc)(GrGLfloat width);
-typedef GrGLvoid (* GrGLLinkProgramProc)(GrGLuint program);
-typedef GrGLvoid* (* GrGLMapBufferProc)(GrGLenum target, GrGLenum access);
-typedef GrGLvoid* (* GrGLMapBufferRangeProc)(GrGLenum target, GrGLintptr offset, GrGLsizeiptr length, GrGLbitfield access);
-typedef GrGLvoid* (* GrGLMapBufferSubDataProc)(GrGLuint target, GrGLintptr offset, GrGLsizeiptr size, GrGLenum access);
-typedef GrGLvoid* (* GrGLMapTexSubImage2DProc)(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, GrGLenum access);
-typedef GrGLvoid (* GrGLPixelStoreiProc)(GrGLenum pname, GrGLint param);
-typedef GrGLvoid (* GrGLPolygonModeProc)(GrGLenum face, GrGLenum mode);
-typedef GrGLvoid (* GrGLPopGroupMarkerProc)();
-typedef GrGLvoid (* GrGLProgramBinaryProc)(GrGLuint program, GrGLenum binaryFormat, void *binary, GrGLsizei length);
-typedef GrGLvoid (* GrGLProgramParameteriProc)(GrGLuint program, GrGLenum pname, GrGLint value);
-typedef GrGLvoid (* GrGLPushGroupMarkerProc)(GrGLsizei length, const char* marker);
-typedef GrGLvoid (* GrGLQueryCounterProc)(GrGLuint id, GrGLenum target);
-typedef GrGLvoid (* GrGLRasterSamplesProc)(GrGLuint samples, GrGLboolean fixedsamplelocations);
-typedef GrGLvoid (* GrGLReadBufferProc)(GrGLenum src);
-typedef GrGLvoid (* GrGLReadPixelsProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, GrGLvoid* pixels);
-typedef GrGLvoid (* GrGLRenderbufferStorageProc)(GrGLenum target, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
-typedef GrGLvoid (* GrGLRenderbufferStorageMultisampleProc)(GrGLenum target, GrGLsizei samples, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
-typedef GrGLvoid (* GrGLResolveMultisampleFramebufferProc)();
-typedef GrGLvoid (* GrGLScissorProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
+using GrGLActiveTextureFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum texture);
+using GrGLAttachShaderFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLuint shader);
+using GrGLBeginQueryFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLuint id);
+using GrGLBindAttribLocationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLuint index, const char* name);
+using GrGLBindBufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLuint buffer);
+using GrGLBindFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLuint framebuffer);
+using GrGLBindRenderbufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLuint renderbuffer);
+using GrGLBindTextureFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLuint texture);
+using GrGLBindFragDataLocationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLuint colorNumber, const GrGLchar* name);
+using GrGLBindFragDataLocationIndexedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLuint colorNumber, GrGLuint index, const GrGLchar* name);
+using GrGLBindVertexArrayFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint array);
+using GrGLBlendBarrierFn = GrGLvoid GR_GL_FUNCTION_TYPE();
+using GrGLBlendColorFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
+using GrGLBlendEquationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode);
+using GrGLBlendFuncFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum sfactor, GrGLenum dfactor);
+using GrGLBlitFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint srcX0, GrGLint srcY0, GrGLint srcX1, GrGLint srcY1, GrGLint dstX0, GrGLint dstY0, GrGLint dstX1, GrGLint dstY1, GrGLbitfield mask, GrGLenum filter);
+using GrGLBufferDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizeiptr size, const GrGLvoid* data, GrGLenum usage);
+using GrGLBufferSubDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLintptr offset, GrGLsizeiptr size, const GrGLvoid* data);
+using GrGLCheckFramebufferStatusFn = GrGLenum GR_GL_FUNCTION_TYPE(GrGLenum target);
+using GrGLClearFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLbitfield mask);
+using GrGLClearColorFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
+using GrGLClearStencilFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint s);
+using GrGLClearTexImageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint texture, GrGLint level, GrGLenum format, GrGLenum type, const GrGLvoid* data);
+using GrGLClearTexSubImageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint texture, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLint zoffset, GrGLsizei width, GrGLsizei height, GrGLsizei depth, GrGLenum format, GrGLenum type, const GrGLvoid* data);
+using GrGLColorMaskFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLboolean red, GrGLboolean green, GrGLboolean blue, GrGLboolean alpha);
+using GrGLCompileShaderFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader);
+using GrGLCompressedTexImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLenum internalformat, GrGLsizei width, GrGLsizei height, GrGLint border, GrGLsizei imageSize, const GrGLvoid* data);
+using GrGLCompressedTexSubImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLsizei imageSize, const GrGLvoid* data);
+using GrGLCopyTexSubImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
+using GrGLCreateProgramFn = GrGLuint GR_GL_FUNCTION_TYPE();
+using GrGLCreateShaderFn = GrGLuint GR_GL_FUNCTION_TYPE(GrGLenum type);
+using GrGLCullFaceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode);
+using GrGLDeleteBuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* buffers);
+using GrGLDeleteFramebuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* framebuffers);
+using GrGLDeleteProgramFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program);
+using GrGLDeleteQueriesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* ids);
+using GrGLDeleteRenderbuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* renderbuffers);
+using GrGLDeleteShaderFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader);
+using GrGLDeleteTexturesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* textures);
+using GrGLDeleteVertexArraysFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* arrays);
+using GrGLDepthMaskFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLboolean flag);
+using GrGLDisableFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum cap);
+using GrGLDisableVertexAttribArrayFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint index);
+using GrGLDrawArraysFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLint first, GrGLsizei count);
+using GrGLDrawArraysInstancedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLint first, GrGLsizei count, GrGLsizei primcount);
+using GrGLDrawArraysIndirectFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, const GrGLvoid* indirect);
+using GrGLDrawBufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode);
+using GrGLDrawBuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLenum* bufs);
+using GrGLDrawElementsFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLsizei count, GrGLenum type, const GrGLvoid* indices);
+using GrGLDrawElementsInstancedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLsizei count, GrGLenum type, const GrGLvoid* indices, GrGLsizei primcount);
+using GrGLDrawElementsIndirectFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLenum type, const GrGLvoid* indirect);
+using GrGLDrawRangeElementsFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLuint start, GrGLuint end, GrGLsizei count, GrGLenum type, const GrGLvoid* indices);
+using GrGLEnableFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum cap);
+using GrGLEnableVertexAttribArrayFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint index);
+using GrGLEndQueryFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target);
+using GrGLFinishFn = GrGLvoid GR_GL_FUNCTION_TYPE();
+using GrGLFlushFn = GrGLvoid GR_GL_FUNCTION_TYPE();
+using GrGLFlushMappedBufferRangeFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLintptr offset, GrGLsizeiptr length);
+using GrGLFramebufferRenderbufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum attachment, GrGLenum renderbuffertarget, GrGLuint renderbuffer);
+using GrGLFramebufferTexture2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum attachment, GrGLenum textarget, GrGLuint texture, GrGLint level);
+using GrGLFramebufferTexture2DMultisampleFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum attachment, GrGLenum textarget, GrGLuint texture, GrGLint level, GrGLsizei samples);
+using GrGLFrontFaceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode);
+using GrGLGenBuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* buffers);
+using GrGLGenFramebuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* framebuffers);
+using GrGLGenerateMipmapFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target);
+using GrGLGenQueriesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* ids);
+using GrGLGenRenderbuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* renderbuffers);
+using GrGLGenTexturesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* textures);
+using GrGLGenVertexArraysFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* arrays);
+using GrGLGetBufferParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, GrGLint* params);
+using GrGLGetErrorFn = GrGLenum GR_GL_FUNCTION_TYPE();
+using GrGLGetFramebufferAttachmentParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum attachment, GrGLenum pname, GrGLint* params);
+using GrGLGetIntegervFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLint* params);
+using GrGLGetMultisamplefvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLuint index, GrGLfloat* val);
+using GrGLGetProgramBinaryFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLsizei bufsize, GrGLsizei* length, GrGLenum* binaryFormat, void* binary);
+using GrGLGetProgramInfoLogFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLsizei bufsize, GrGLsizei* length, char* infolog);
+using GrGLGetProgramivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLenum pname, GrGLint* params);
+using GrGLGetQueryivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum GLtarget, GrGLenum pname, GrGLint* params);
+using GrGLGetQueryObjecti64vFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint id, GrGLenum pname, GrGLint64* params);
+using GrGLGetQueryObjectivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint id, GrGLenum pname, GrGLint* params);
+using GrGLGetQueryObjectui64vFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint id, GrGLenum pname, GrGLuint64* params);
+using GrGLGetQueryObjectuivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint id, GrGLenum pname, GrGLuint* params);
+using GrGLGetRenderbufferParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, GrGLint* params);
+using GrGLGetShaderInfoLogFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader, GrGLsizei bufsize, GrGLsizei* length, char* infolog);
+using GrGLGetShaderivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader, GrGLenum pname, GrGLint* params);
+using GrGLGetShaderPrecisionFormatFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum shadertype, GrGLenum precisiontype, GrGLint* range, GrGLint* precision);
+using GrGLGetStringFn = const GrGLubyte* GR_GL_FUNCTION_TYPE(GrGLenum name);
+using GrGLGetStringiFn = const GrGLubyte* GR_GL_FUNCTION_TYPE(GrGLenum name, GrGLuint index);
+using GrGLGetTexLevelParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLenum pname, GrGLint* params);
+using GrGLGetUniformLocationFn = GrGLint GR_GL_FUNCTION_TYPE(GrGLuint program, const char* name);
+using GrGLInsertEventMarkerFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei length, const char* marker);
+using GrGLInvalidateBufferDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint buffer);
+using GrGLInvalidateBufferSubDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint buffer, GrGLintptr offset, GrGLsizeiptr length);
+using GrGLInvalidateFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei numAttachments, const GrGLenum* attachments);
+using GrGLInvalidateSubFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei numAttachments, const GrGLenum* attachments, GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
+using GrGLInvalidateTexImageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint texture, GrGLint level);
+using GrGLInvalidateTexSubImageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint texture, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLint zoffset, GrGLsizei width, GrGLsizei height, GrGLsizei depth);
+using GrGLIsTextureFn = GrGLboolean GR_GL_FUNCTION_TYPE(GrGLuint texture);
+using GrGLLineWidthFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLfloat width);
+using GrGLLinkProgramFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program);
+using GrGLMapBufferFn = GrGLvoid* GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum access);
+using GrGLMapBufferRangeFn = GrGLvoid* GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLintptr offset, GrGLsizeiptr length, GrGLbitfield access);
+using GrGLMapBufferSubDataFn = GrGLvoid* GR_GL_FUNCTION_TYPE(GrGLuint target, GrGLintptr offset, GrGLsizeiptr size, GrGLenum access);
+using GrGLMapTexSubImage2DFn = GrGLvoid* GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, GrGLenum access);
+using GrGLPixelStoreiFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLint param);
+using GrGLPolygonModeFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum face, GrGLenum mode);
+using GrGLPopGroupMarkerFn = GrGLvoid GR_GL_FUNCTION_TYPE();
+using GrGLProgramBinaryFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLenum binaryFormat, void* binary, GrGLsizei length);
+using GrGLProgramParameteriFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLenum pname, GrGLint value);
+using GrGLPushGroupMarkerFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei length, const char* marker);
+using GrGLQueryCounterFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint id, GrGLenum target);
+using GrGLRasterSamplesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint samples, GrGLboolean fixedsamplelocations);
+using GrGLReadBufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum src);
+using GrGLReadPixelsFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, GrGLvoid* pixels);
+using GrGLRenderbufferStorageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
+using GrGLRenderbufferStorageMultisampleFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei samples, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
+using GrGLResolveMultisampleFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE();
+using GrGLScissorFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
// GL_CHROMIUM_bind_uniform_location
-typedef GrGLvoid (* GrGLBindUniformLocationProc)(GrGLuint program, GrGLint location, const char* name);
+using GrGLBindUniformLocationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLint location, const char* name);
#if GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE
-typedef GrGLvoid (* GrGLShaderSourceProc)(GrGLuint shader, GrGLsizei count, const char* const * str, const GrGLint* length);
+using GrGLShaderSourceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader, GrGLsizei count, const char* const* str, const GrGLint* length);
#else
-typedef GrGLvoid (* GrGLShaderSourceProc)(GrGLuint shader, GrGLsizei count, const char** str, const GrGLint* length);
+using GrGLShaderSourceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader, GrGLsizei count, const char** str, const GrGLint* length);
#endif
-typedef GrGLvoid (* GrGLStencilFuncProc)(GrGLenum func, GrGLint ref, GrGLuint mask);
-typedef GrGLvoid (* GrGLStencilFuncSeparateProc)(GrGLenum face, GrGLenum func, GrGLint ref, GrGLuint mask);
-typedef GrGLvoid (* GrGLStencilMaskProc)(GrGLuint mask);
-typedef GrGLvoid (* GrGLStencilMaskSeparateProc)(GrGLenum face, GrGLuint mask);
-typedef GrGLvoid (* GrGLStencilOpProc)(GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
-typedef GrGLvoid (* GrGLStencilOpSeparateProc)(GrGLenum face, GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
-typedef GrGLvoid (* GrGLTexBufferProc)(GrGLenum target, GrGLenum internalformat, GrGLuint buffer);
-typedef GrGLvoid (* GrGLTexBufferRangeProc)(GrGLenum target, GrGLenum internalformat, GrGLuint buffer, GrGLintptr offset, GrGLsizeiptr size);
-typedef GrGLvoid (* GrGLTexImage2DProc)(GrGLenum target, GrGLint level, GrGLint internalformat, GrGLsizei width, GrGLsizei height, GrGLint border, GrGLenum format, GrGLenum type, const GrGLvoid* pixels);
-typedef GrGLvoid (* GrGLTexParameteriProc)(GrGLenum target, GrGLenum pname, GrGLint param);
-typedef GrGLvoid (* GrGLTexParameterivProc)(GrGLenum target, GrGLenum pname, const GrGLint* params);
-typedef GrGLvoid (* GrGLTexStorage2DProc)(GrGLenum target, GrGLsizei levels, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
-typedef GrGLvoid (* GrGLDiscardFramebufferProc)(GrGLenum target, GrGLsizei numAttachments, const GrGLenum* attachments);
-typedef GrGLvoid (* GrGLTexSubImage2DProc)(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, const GrGLvoid* pixels);
-typedef GrGLvoid (* GrGLTextureBarrierProc)();
-typedef GrGLvoid (* GrGLUniform1fProc)(GrGLint location, GrGLfloat v0);
-typedef GrGLvoid (* GrGLUniform1iProc)(GrGLint location, GrGLint v0);
-typedef GrGLvoid (* GrGLUniform1fvProc)(GrGLint location, GrGLsizei count, const GrGLfloat* v);
-typedef GrGLvoid (* GrGLUniform1ivProc)(GrGLint location, GrGLsizei count, const GrGLint* v);
-typedef GrGLvoid (* GrGLUniform2fProc)(GrGLint location, GrGLfloat v0, GrGLfloat v1);
-typedef GrGLvoid (* GrGLUniform2iProc)(GrGLint location, GrGLint v0, GrGLint v1);
-typedef GrGLvoid (* GrGLUniform2fvProc)(GrGLint location, GrGLsizei count, const GrGLfloat* v);
-typedef GrGLvoid (* GrGLUniform2ivProc)(GrGLint location, GrGLsizei count, const GrGLint* v);
-typedef GrGLvoid (* GrGLUniform3fProc)(GrGLint location, GrGLfloat v0, GrGLfloat v1, GrGLfloat v2);
-typedef GrGLvoid (* GrGLUniform3iProc)(GrGLint location, GrGLint v0, GrGLint v1, GrGLint v2);
-typedef GrGLvoid (* GrGLUniform3fvProc)(GrGLint location, GrGLsizei count, const GrGLfloat* v);
-typedef GrGLvoid (* GrGLUniform3ivProc)(GrGLint location, GrGLsizei count, const GrGLint* v);
-typedef GrGLvoid (* GrGLUniform4fProc)(GrGLint location, GrGLfloat v0, GrGLfloat v1, GrGLfloat v2, GrGLfloat v3);
-typedef GrGLvoid (* GrGLUniform4iProc)(GrGLint location, GrGLint v0, GrGLint v1, GrGLint v2, GrGLint v3);
-typedef GrGLvoid (* GrGLUniform4fvProc)(GrGLint location, GrGLsizei count, const GrGLfloat* v);
-typedef GrGLvoid (* GrGLUniform4ivProc)(GrGLint location, GrGLsizei count, const GrGLint* v);
-typedef GrGLvoid (* GrGLUniformMatrix2fvProc)(GrGLint location, GrGLsizei count, GrGLboolean transpose, const GrGLfloat* value);
-typedef GrGLvoid (* GrGLUniformMatrix3fvProc)(GrGLint location, GrGLsizei count, GrGLboolean transpose, const GrGLfloat* value);
-typedef GrGLvoid (* GrGLUniformMatrix4fvProc)(GrGLint location, GrGLsizei count, GrGLboolean transpose, const GrGLfloat* value);
-typedef GrGLboolean (* GrGLUnmapBufferProc)(GrGLenum target);
-typedef GrGLvoid (* GrGLUnmapBufferSubDataProc)(const GrGLvoid* mem);
-typedef GrGLvoid (* GrGLUnmapTexSubImage2DProc)(const GrGLvoid* mem);
-typedef GrGLvoid (* GrGLUseProgramProc)(GrGLuint program);
-typedef GrGLvoid (* GrGLVertexAttrib1fProc)(GrGLuint indx, const GrGLfloat value);
-typedef GrGLvoid (* GrGLVertexAttrib2fvProc)(GrGLuint indx, const GrGLfloat* values);
-typedef GrGLvoid (* GrGLVertexAttrib3fvProc)(GrGLuint indx, const GrGLfloat* values);
-typedef GrGLvoid (* GrGLVertexAttrib4fvProc)(GrGLuint indx, const GrGLfloat* values);
-typedef GrGLvoid (* GrGLVertexAttribDivisorProc)(GrGLuint index, GrGLuint divisor);
-typedef GrGLvoid (* GrGLVertexAttribIPointerProc)(GrGLuint indx, GrGLint size, GrGLenum type, GrGLsizei stride, const GrGLvoid* ptr);
-typedef GrGLvoid (* GrGLVertexAttribPointerProc)(GrGLuint indx, GrGLint size, GrGLenum type, GrGLboolean normalized, GrGLsizei stride, const GrGLvoid* ptr);
-typedef GrGLvoid (* GrGLViewportProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
+using GrGLStencilFuncFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum func, GrGLint ref, GrGLuint mask);
+using GrGLStencilFuncSeparateFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum face, GrGLenum func, GrGLint ref, GrGLuint mask);
+using GrGLStencilMaskFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint mask);
+using GrGLStencilMaskSeparateFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum face, GrGLuint mask);
+using GrGLStencilOpFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
+using GrGLStencilOpSeparateFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum face, GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
+using GrGLTexBufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum internalformat, GrGLuint buffer);
+using GrGLTexBufferRangeFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum internalformat, GrGLuint buffer, GrGLintptr offset, GrGLsizeiptr size);
+using GrGLTexImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLint internalformat, GrGLsizei width, GrGLsizei height, GrGLint border, GrGLenum format, GrGLenum type, const GrGLvoid* pixels);
+using GrGLTexParameteriFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, GrGLint param);
+using GrGLTexParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, const GrGLint* params);
+using GrGLTexStorage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei levels, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
+using GrGLDiscardFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei numAttachments, const GrGLenum* attachments);
+using GrGLTexSubImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, const GrGLvoid* pixels);
+using GrGLTextureBarrierFn = GrGLvoid GR_GL_FUNCTION_TYPE();
+using GrGLUniform1fFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLfloat v0);
+using GrGLUniform1iFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLint v0);
+using GrGLUniform1fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLfloat* v);
+using GrGLUniform1ivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLint* v);
+using GrGLUniform2fFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLfloat v0, GrGLfloat v1);
+using GrGLUniform2iFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLint v0, GrGLint v1);
+using GrGLUniform2fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLfloat* v);
+using GrGLUniform2ivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLint* v);
+using GrGLUniform3fFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLfloat v0, GrGLfloat v1, GrGLfloat v2);
+using GrGLUniform3iFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLint v0, GrGLint v1, GrGLint v2);
+using GrGLUniform3fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLfloat* v);
+using GrGLUniform3ivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLint* v);
+using GrGLUniform4fFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLfloat v0, GrGLfloat v1, GrGLfloat v2, GrGLfloat v3);
+using GrGLUniform4iFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLint v0, GrGLint v1, GrGLint v2, GrGLint v3);
+using GrGLUniform4fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLfloat* v);
+using GrGLUniform4ivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLint* v);
+using GrGLUniformMatrix2fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, GrGLboolean transpose, const GrGLfloat* value);
+using GrGLUniformMatrix3fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, GrGLboolean transpose, const GrGLfloat* value);
+using GrGLUniformMatrix4fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, GrGLboolean transpose, const GrGLfloat* value);
+using GrGLUnmapBufferFn = GrGLboolean GR_GL_FUNCTION_TYPE(GrGLenum target);
+using GrGLUnmapBufferSubDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(const GrGLvoid* mem);
+using GrGLUnmapTexSubImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(const GrGLvoid* mem);
+using GrGLUseProgramFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program);
+using GrGLVertexAttrib1fFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, const GrGLfloat value);
+using GrGLVertexAttrib2fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, const GrGLfloat* values);
+using GrGLVertexAttrib3fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, const GrGLfloat* values);
+using GrGLVertexAttrib4fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, const GrGLfloat* values);
+using GrGLVertexAttribDivisorFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint index, GrGLuint divisor);
+using GrGLVertexAttribIPointerFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, GrGLint size, GrGLenum type, GrGLsizei stride, const GrGLvoid* ptr);
+using GrGLVertexAttribPointerFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, GrGLint size, GrGLenum type, GrGLboolean normalized, GrGLsizei stride, const GrGLvoid* ptr);
+using GrGLViewportFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
/* GL_NV_path_rendering */
-typedef GrGLvoid (* GrGLMatrixLoadfProc)(GrGLenum matrixMode, const GrGLfloat* m);
-typedef GrGLvoid (* GrGLMatrixLoadIdentityProc)(GrGLenum);
-typedef GrGLvoid (* GrGLPathCommandsProc)(GrGLuint path, GrGLsizei numCommands, const GrGLubyte *commands, GrGLsizei numCoords, GrGLenum coordType, const GrGLvoid *coords);
-typedef GrGLvoid (* GrGLPathParameteriProc)(GrGLuint path, GrGLenum pname, GrGLint value);
-typedef GrGLvoid (* GrGLPathParameterfProc)(GrGLuint path, GrGLenum pname, GrGLfloat value);
-typedef GrGLuint (* GrGLGenPathsProc)(GrGLsizei range);
-typedef GrGLvoid (* GrGLDeletePathsProc)(GrGLuint path, GrGLsizei range);
-typedef GrGLboolean (* GrGLIsPathProc)(GrGLuint path);
-typedef GrGLvoid (* GrGLPathStencilFuncProc)(GrGLenum func, GrGLint ref, GrGLuint mask);
-typedef GrGLvoid (* GrGLStencilFillPathProc)(GrGLuint path, GrGLenum fillMode, GrGLuint mask);
-typedef GrGLvoid (* GrGLStencilStrokePathProc)(GrGLuint path, GrGLint reference, GrGLuint mask);
-typedef GrGLvoid (* GrGLStencilFillPathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLenum fillMode, GrGLuint mask, GrGLenum transformType, const GrGLfloat *transformValues);
-typedef GrGLvoid (* GrGLStencilStrokePathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLint reference, GrGLuint mask, GrGLenum transformType, const GrGLfloat *transformValues);
-typedef GrGLvoid (* GrGLCoverFillPathProc)(GrGLuint path, GrGLenum coverMode);
-typedef GrGLvoid (* GrGLCoverStrokePathProc)(GrGLuint name, GrGLenum coverMode);
-typedef GrGLvoid (* GrGLCoverFillPathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat *transformValues);
-typedef GrGLvoid (* GrGLCoverStrokePathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat* transformValues);
+using GrGLMatrixLoadfFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum matrixMode, const GrGLfloat* m);
+using GrGLMatrixLoadIdentityFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum);
+using GrGLPathCommandsFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint path, GrGLsizei numCommands, const GrGLubyte* commands, GrGLsizei numCoords, GrGLenum coordType, const GrGLvoid* coords);
+using GrGLPathParameteriFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint path, GrGLenum pname, GrGLint value);
+using GrGLPathParameterfFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint path, GrGLenum pname, GrGLfloat value);
+using GrGLGenPathsFn = GrGLuint GR_GL_FUNCTION_TYPE(GrGLsizei range);
+using GrGLDeletePathsFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint path, GrGLsizei range);
+using GrGLIsPathFn = GrGLboolean GR_GL_FUNCTION_TYPE(GrGLuint path);
+using GrGLPathStencilFuncFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum func, GrGLint ref, GrGLuint mask);
+using GrGLStencilFillPathFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint path, GrGLenum fillMode, GrGLuint mask);
+using GrGLStencilStrokePathFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint path, GrGLint reference, GrGLuint mask);
+using GrGLStencilFillPathInstancedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid* paths, GrGLuint pathBase, GrGLenum fillMode, GrGLuint mask, GrGLenum transformType, const GrGLfloat* transformValues);
+using GrGLStencilStrokePathInstancedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid* paths, GrGLuint pathBase, GrGLint reference, GrGLuint mask, GrGLenum transformType, const GrGLfloat* transformValues);
+using GrGLCoverFillPathFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint path, GrGLenum coverMode);
+using GrGLCoverStrokePathFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint name, GrGLenum coverMode);
+using GrGLCoverFillPathInstancedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid* paths, GrGLuint pathBase, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat* transformValues);
+using GrGLCoverStrokePathInstancedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid* paths, GrGLuint pathBase, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat* transformValues);
// NV_path_rendering v1.2
-typedef GrGLvoid (* GrGLStencilThenCoverFillPathProc)(GrGLuint path, GrGLenum fillMode, GrGLuint mask, GrGLenum coverMode);
-typedef GrGLvoid (* GrGLStencilThenCoverStrokePathProc)(GrGLuint path, GrGLint reference, GrGLuint mask, GrGLenum coverMode);
-typedef GrGLvoid (* GrGLStencilThenCoverFillPathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLenum fillMode, GrGLuint mask, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat *transformValues);
-typedef GrGLvoid (* GrGLStencilThenCoverStrokePathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLint reference, GrGLuint mask, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat *transformValues);
+using GrGLStencilThenCoverFillPathFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint path, GrGLenum fillMode, GrGLuint mask, GrGLenum coverMode);
+using GrGLStencilThenCoverStrokePathFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint path, GrGLint reference, GrGLuint mask, GrGLenum coverMode);
+using GrGLStencilThenCoverFillPathInstancedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid* paths, GrGLuint pathBase, GrGLenum fillMode, GrGLuint mask, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat* transformValues);
+using GrGLStencilThenCoverStrokePathInstancedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid* paths, GrGLuint pathBase, GrGLint reference, GrGLuint mask, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat* transformValues);
// NV_path_rendering v1.3
-typedef GrGLvoid (* GrGLProgramPathFragmentInputGenProc)(GrGLuint program, GrGLint location, GrGLenum genMode, GrGLint components,const GrGLfloat *coeffs);
+using GrGLProgramPathFragmentInputGenFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLint location, GrGLenum genMode, GrGLint components, const GrGLfloat* coeffs);
// CHROMIUM_path_rendering
-typedef GrGLvoid (* GrGLBindFragmentInputLocationProc)(GrGLuint program, GrGLint location, const GrGLchar* name);
+using GrGLBindFragmentInputLocationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLint location, const GrGLchar* name);
/* ARB_program_interface_query */
-typedef GrGLint (* GrGLGetProgramResourceLocationProc)(GrGLuint program, GrGLenum programInterface, const GrGLchar *name);
+using GrGLGetProgramResourceLocationFn = GrGLint GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLenum programInterface, const GrGLchar* name);
/* GL_NV_framebuffer_mixed_samples */
-typedef GrGLvoid (* GrGLCoverageModulationProc)(GrGLenum components);
+using GrGLCoverageModulationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum components);
/* EXT_multi_draw_indirect */
-typedef GrGLvoid (* GrGLMultiDrawArraysIndirectProc)(GrGLenum mode, const GrGLvoid *indirect, GrGLsizei drawcount, GrGLsizei stride);
-typedef GrGLvoid (* GrGLMultiDrawElementsIndirectProc)(GrGLenum mode, GrGLenum type, const GrGLvoid *indirect, GrGLsizei drawcount, GrGLsizei stride);
+using GrGLMultiDrawArraysIndirectFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, const GrGLvoid* indirect, GrGLsizei drawcount, GrGLsizei stride);
+using GrGLMultiDrawElementsIndirectFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLenum type, const GrGLvoid* indirect, GrGLsizei drawcount, GrGLsizei stride);
/* ARB_sample_shading */
-typedef GrGLvoid (* GrGLMinSampleShadingProc)(GrGLfloat value);
+using GrGLMinSampleShadingFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLfloat value);
/* ARB_sync */
-typedef GrGLsync (* GrGLFenceSyncProc)(GrGLenum condition, GrGLbitfield flags);
-typedef GrGLboolean (* GrGLIsSyncProc)(GrGLsync sync);
-typedef GrGLenum (* GrGLClientWaitSyncProc)(GrGLsync sync, GrGLbitfield flags, GrGLuint64 timeout);
-typedef GrGLvoid (* GrGLWaitSyncProc)(GrGLsync sync, GrGLbitfield flags, GrGLuint64 timeout);
-typedef GrGLvoid (* GrGLDeleteSyncProc)(GrGLsync sync);
+using GrGLFenceSyncFn = GrGLsync GR_GL_FUNCTION_TYPE(GrGLenum condition, GrGLbitfield flags);
+using GrGLIsSyncFn = GrGLboolean GR_GL_FUNCTION_TYPE(GrGLsync sync);
+using GrGLClientWaitSyncFn = GrGLenum GR_GL_FUNCTION_TYPE(GrGLsync sync, GrGLbitfield flags, GrGLuint64 timeout);
+using GrGLWaitSyncFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsync sync, GrGLbitfield flags, GrGLuint64 timeout);
+using GrGLDeleteSyncFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsync sync);
/* ARB_internalformat_query */
-typedef GrGLvoid (* GrGLGetInternalformativProc)(GrGLenum target, GrGLenum internalformat, GrGLenum pname, GrGLsizei bufSize, GrGLint *params);
+using GrGLGetInternalformativFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum internalformat, GrGLenum pname, GrGLsizei bufSize, GrGLint* params);
/* KHR_debug */
-typedef GrGLvoid (* GrGLDebugMessageControlProc)(GrGLenum source, GrGLenum type, GrGLenum severity, GrGLsizei count, const GrGLuint* ids, GrGLboolean enabled);
-typedef GrGLvoid (* GrGLDebugMessageInsertProc)(GrGLenum source, GrGLenum type, GrGLuint id, GrGLenum severity, GrGLsizei length, const GrGLchar* buf);
-typedef GrGLvoid (* GrGLDebugMessageCallbackProc)(GRGLDEBUGPROC callback, const GrGLvoid* userParam);
-typedef GrGLuint (* GrGLGetDebugMessageLogProc)(GrGLuint count, GrGLsizei bufSize, GrGLenum* sources, GrGLenum* types, GrGLuint* ids, GrGLenum* severities, GrGLsizei* lengths, GrGLchar* messageLog);
-typedef GrGLvoid (* GrGLPushDebugGroupProc)(GrGLenum source, GrGLuint id, GrGLsizei length, const GrGLchar * message);
-typedef GrGLvoid (* GrGLPopDebugGroupProc)();
-typedef GrGLvoid (* GrGLObjectLabelProc)(GrGLenum identifier, GrGLuint name, GrGLsizei length, const GrGLchar *label);
+using GrGLDebugMessageControlFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum source, GrGLenum type, GrGLenum severity, GrGLsizei count, const GrGLuint* ids, GrGLboolean enabled);
+using GrGLDebugMessageInsertFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum source, GrGLenum type, GrGLuint id, GrGLenum severity, GrGLsizei length, const GrGLchar* buf);
+using GrGLDebugMessageCallbackFn = GrGLvoid GR_GL_FUNCTION_TYPE(GRGLDEBUGPROC callback, const GrGLvoid* userParam);
+using GrGLGetDebugMessageLogFn = GrGLuint GR_GL_FUNCTION_TYPE(GrGLuint count, GrGLsizei bufSize, GrGLenum* sources, GrGLenum* types, GrGLuint* ids, GrGLenum* severities, GrGLsizei* lengths, GrGLchar* messageLog);
+using GrGLPushDebugGroupFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum source, GrGLuint id, GrGLsizei length, const GrGLchar* message);
+using GrGLPopDebugGroupFn = GrGLvoid GR_GL_FUNCTION_TYPE();
+using GrGLObjectLabelFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum identifier, GrGLuint name, GrGLsizei length, const GrGLchar* label);
/** EXT_window_rectangles */
-typedef GrGLvoid (* GrGLWindowRectanglesProc)(GrGLenum mode, GrGLsizei count, const GrGLint box[]);
+using GrGLWindowRectanglesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLsizei count, const GrGLint box[]);
/** EGL functions */
-typedef const char* (* GrEGLQueryStringProc)(GrEGLDisplay dpy, GrEGLint name);
-typedef GrEGLDisplay (* GrEGLGetCurrentDisplayProc)();
-typedef GrEGLImage (* GrEGLCreateImageProc)(GrEGLDisplay dpy, GrEGLContext ctx, GrEGLenum target, GrEGLClientBuffer buffer, const GrEGLint *attrib_list);
-typedef GrEGLBoolean (* GrEGLDestroyImageProc)(GrEGLDisplay dpy, GrEGLImage image);
+using GrEGLQueryStringFn = const char* GR_GL_FUNCTION_TYPE(GrEGLDisplay dpy, GrEGLint name);
+using GrEGLGetCurrentDisplayFn = GrEGLDisplay GR_GL_FUNCTION_TYPE();
+using GrEGLCreateImageFn = GrEGLImage GR_GL_FUNCTION_TYPE(GrEGLDisplay dpy, GrEGLContext ctx, GrEGLenum target, GrEGLClientBuffer buffer, const GrEGLint* attrib_list);
+using GrEGLDestroyImageFn = GrEGLBoolean GR_GL_FUNCTION_TYPE(GrEGLDisplay dpy, GrEGLImage image);
} // extern "C"
+// Legacy name used in Chrome. TODO: Remove when removed from Chrome.
+using GrGLGetStringProc = GrGLGetStringFn;
+
// This is a lighter-weight std::function, trying to reduce code size and compile time
// by only supporting the exact use cases we require.
template <typename T> class GrGLFunction;
template <typename R, typename... Args>
-class GrGLFunction<R(*)(Args...)>{
+class GrGLFunction<R GR_GL_FUNCTION_TYPE(Args...)> {
public:
+ using Fn = R GR_GL_FUNCTION_TYPE(Args...);
// Construct empty.
- GrGLFunction() : fCall(nullptr) {}
- GrGLFunction(std::nullptr_t) : GrGLFunction() {}
+ GrGLFunction() = default;
+ GrGLFunction(std::nullptr_t) {}
// Construct from a simple function pointer.
- GrGLFunction(R (GR_GL_FUNCTION_TYPE* fn_ptr)(Args...)) : GrGLFunction() {
+ GrGLFunction(Fn* fn_ptr) {
+ static_assert(sizeof(fn_ptr) <= sizeof(fBuf), "fBuf is too small");
if (fn_ptr) {
memcpy(fBuf, &fn_ptr, sizeof(fn_ptr));
fCall = [](const void* buf, Args... args) {
- auto fn_ptr = *(R (GR_GL_FUNCTION_TYPE**)(Args...))buf;
- return fn_ptr(args...);
+ return (*(Fn**)buf)(std::forward<Args>(args)...);
};
}
}
@@ -287,10 +291,10 @@ public:
template <typename Closure>
GrGLFunction(Closure closure) : GrGLFunction() {
static_assert(sizeof(Closure) <= sizeof(fBuf), "fBuf is too small");
- #if defined(__APPLE__) // I am having serious trouble getting these to work with all STLs...
+#if defined(__APPLE__) // I am having serious trouble getting these to work with all STLs...
static_assert(std::is_trivially_copyable<Closure>::value, "");
static_assert(std::is_trivially_destructible<Closure>::value, "");
- #endif
+#endif
memcpy(fBuf, &closure, sizeof(closure));
fCall = [](const void* buf, Args... args) {
@@ -299,20 +303,40 @@ public:
};
}
+ // See other (temporary) specialization below.
+ GrGLFunction(const GrGLFunction<R(*)(Args...)>& that);
+
R operator()(Args... args) const {
SkASSERT(fCall);
- return fCall(fBuf, args...);
+ return fCall(fBuf, std::forward<Args>(args)...);
}
- explicit operator bool() const {
- return fCall != nullptr;
- }
+ explicit operator bool() const { return fCall != nullptr; }
void reset() { fCall = nullptr; }
private:
- R (*fCall)(const void*, Args...);
+ using Call = R(const void* buf, Args...);
+ Call* fCall = nullptr;
size_t fBuf[4];
};
+/**
+ * Chrome instantiates GrGLFunctions on function pointers that don't include GR_GL_FUNCTION_TYPE.
+ * This can go away after Chrome is updated to use the above specialization.
+ */
+template <typename R, typename... Args>
+class GrGLFunction<R (*)(Args...)> : public GrGLFunction<R GR_GL_FUNCTION_TYPE(Args...)> {
+public:
+ template <typename Closure>
+ GrGLFunction(Closure closure)
+ : GrGLFunction<R GR_GL_FUNCTION_TYPE(Args...)>(std::move(closure)) {}
+};
+
+template <typename R, typename... Args>
+GrGLFunction<R GR_GL_FUNCTION_TYPE(Args...)>::GrGLFunction(const GrGLFunction<R (*)(Args...)>& that)
+ : fCall(that.fCall) {
+ memcpy(fBuf, that.fBuf, sizeof(fBuf));
+}
+
#endif
diff --git a/chromium/third_party/skia/include/gpu/gl/GrGLInterface.h b/chromium/third_party/skia/include/gpu/gl/GrGLInterface.h
index a910fd86f62..81d648d7807 100644
--- a/chromium/third_party/skia/include/gpu/gl/GrGLInterface.h
+++ b/chromium/third_party/skia/include/gpu/gl/GrGLInterface.h
@@ -79,123 +79,123 @@ public:
* operator.
*/
struct Functions {
- GrGLFunction<GrGLActiveTextureProc> fActiveTexture;
- GrGLFunction<GrGLAttachShaderProc> fAttachShader;
- GrGLFunction<GrGLBeginQueryProc> fBeginQuery;
- GrGLFunction<GrGLBindAttribLocationProc> fBindAttribLocation;
- GrGLFunction<GrGLBindBufferProc> fBindBuffer;
- GrGLFunction<GrGLBindFragDataLocationProc> fBindFragDataLocation;
- GrGLFunction<GrGLBindFragDataLocationIndexedProc> fBindFragDataLocationIndexed;
- GrGLFunction<GrGLBindFramebufferProc> fBindFramebuffer;
- GrGLFunction<GrGLBindRenderbufferProc> fBindRenderbuffer;
- GrGLFunction<GrGLBindTextureProc> fBindTexture;
- GrGLFunction<GrGLBindVertexArrayProc> fBindVertexArray;
- GrGLFunction<GrGLBlendBarrierProc> fBlendBarrier;
- GrGLFunction<GrGLBlendColorProc> fBlendColor;
- GrGLFunction<GrGLBlendEquationProc> fBlendEquation;
- GrGLFunction<GrGLBlendFuncProc> fBlendFunc;
- GrGLFunction<GrGLBlitFramebufferProc> fBlitFramebuffer;
- GrGLFunction<GrGLBufferDataProc> fBufferData;
- GrGLFunction<GrGLBufferSubDataProc> fBufferSubData;
- GrGLFunction<GrGLCheckFramebufferStatusProc> fCheckFramebufferStatus;
- GrGLFunction<GrGLClearProc> fClear;
- GrGLFunction<GrGLClearColorProc> fClearColor;
- GrGLFunction<GrGLClearStencilProc> fClearStencil;
- GrGLFunction<GrGLClearTexImageProc> fClearTexImage;
- GrGLFunction<GrGLClearTexSubImageProc> fClearTexSubImage;
- GrGLFunction<GrGLColorMaskProc> fColorMask;
- GrGLFunction<GrGLCompileShaderProc> fCompileShader;
- GrGLFunction<GrGLCompressedTexImage2DProc> fCompressedTexImage2D;
- GrGLFunction<GrGLCompressedTexSubImage2DProc> fCompressedTexSubImage2D;
- GrGLFunction<GrGLCopyTexSubImage2DProc> fCopyTexSubImage2D;
- GrGLFunction<GrGLCreateProgramProc> fCreateProgram;
- GrGLFunction<GrGLCreateShaderProc> fCreateShader;
- GrGLFunction<GrGLCullFaceProc> fCullFace;
- GrGLFunction<GrGLDeleteBuffersProc> fDeleteBuffers;
- GrGLFunction<GrGLDeleteFramebuffersProc> fDeleteFramebuffers;
- GrGLFunction<GrGLDeleteProgramProc> fDeleteProgram;
- GrGLFunction<GrGLDeleteQueriesProc> fDeleteQueries;
- GrGLFunction<GrGLDeleteRenderbuffersProc> fDeleteRenderbuffers;
- GrGLFunction<GrGLDeleteShaderProc> fDeleteShader;
- GrGLFunction<GrGLDeleteTexturesProc> fDeleteTextures;
- GrGLFunction<GrGLDeleteVertexArraysProc> fDeleteVertexArrays;
- GrGLFunction<GrGLDepthMaskProc> fDepthMask;
- GrGLFunction<GrGLDisableProc> fDisable;
- GrGLFunction<GrGLDisableVertexAttribArrayProc> fDisableVertexAttribArray;
- GrGLFunction<GrGLDrawArraysProc> fDrawArrays;
- GrGLFunction<GrGLDrawArraysIndirectProc> fDrawArraysIndirect;
- GrGLFunction<GrGLDrawArraysInstancedProc> fDrawArraysInstanced;
- GrGLFunction<GrGLDrawBufferProc> fDrawBuffer;
- GrGLFunction<GrGLDrawBuffersProc> fDrawBuffers;
- GrGLFunction<GrGLDrawElementsProc> fDrawElements;
- GrGLFunction<GrGLDrawElementsIndirectProc> fDrawElementsIndirect;
- GrGLFunction<GrGLDrawElementsInstancedProc> fDrawElementsInstanced;
- GrGLFunction<GrGLDrawRangeElementsProc> fDrawRangeElements;
- GrGLFunction<GrGLEnableProc> fEnable;
- GrGLFunction<GrGLEnableVertexAttribArrayProc> fEnableVertexAttribArray;
- GrGLFunction<GrGLEndQueryProc> fEndQuery;
- GrGLFunction<GrGLFinishProc> fFinish;
- GrGLFunction<GrGLFlushProc> fFlush;
- GrGLFunction<GrGLFlushMappedBufferRangeProc> fFlushMappedBufferRange;
- GrGLFunction<GrGLFramebufferRenderbufferProc> fFramebufferRenderbuffer;
- GrGLFunction<GrGLFramebufferTexture2DProc> fFramebufferTexture2D;
- GrGLFunction<GrGLFramebufferTexture2DMultisampleProc> fFramebufferTexture2DMultisample;
- GrGLFunction<GrGLFrontFaceProc> fFrontFace;
- GrGLFunction<GrGLGenBuffersProc> fGenBuffers;
- GrGLFunction<GrGLGenFramebuffersProc> fGenFramebuffers;
- GrGLFunction<GrGLGenerateMipmapProc> fGenerateMipmap;
- GrGLFunction<GrGLGenQueriesProc> fGenQueries;
- GrGLFunction<GrGLGenRenderbuffersProc> fGenRenderbuffers;
- GrGLFunction<GrGLGenTexturesProc> fGenTextures;
- GrGLFunction<GrGLGenVertexArraysProc> fGenVertexArrays;
- GrGLFunction<GrGLGetBufferParameterivProc> fGetBufferParameteriv;
- GrGLFunction<GrGLGetErrorProc> fGetError;
- GrGLFunction<GrGLGetFramebufferAttachmentParameterivProc> fGetFramebufferAttachmentParameteriv;
- GrGLFunction<GrGLGetIntegervProc> fGetIntegerv;
- GrGLFunction<GrGLGetMultisamplefvProc> fGetMultisamplefv;
- GrGLFunction<GrGLGetProgramBinaryProc> fGetProgramBinary;
- GrGLFunction<GrGLGetProgramInfoLogProc> fGetProgramInfoLog;
- GrGLFunction<GrGLGetProgramivProc> fGetProgramiv;
- GrGLFunction<GrGLGetQueryObjecti64vProc> fGetQueryObjecti64v;
- GrGLFunction<GrGLGetQueryObjectivProc> fGetQueryObjectiv;
- GrGLFunction<GrGLGetQueryObjectui64vProc> fGetQueryObjectui64v;
- GrGLFunction<GrGLGetQueryObjectuivProc> fGetQueryObjectuiv;
- GrGLFunction<GrGLGetQueryivProc> fGetQueryiv;
- GrGLFunction<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv;
- GrGLFunction<GrGLGetShaderInfoLogProc> fGetShaderInfoLog;
- GrGLFunction<GrGLGetShaderivProc> fGetShaderiv;
- GrGLFunction<GrGLGetShaderPrecisionFormatProc> fGetShaderPrecisionFormat;
- GrGLFunction<GrGLGetStringProc> fGetString;
- GrGLFunction<GrGLGetStringiProc> fGetStringi;
- GrGLFunction<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv;
- GrGLFunction<GrGLGetUniformLocationProc> fGetUniformLocation;
- GrGLFunction<GrGLInsertEventMarkerProc> fInsertEventMarker;
- GrGLFunction<GrGLInvalidateBufferDataProc> fInvalidateBufferData;
- GrGLFunction<GrGLInvalidateBufferSubDataProc> fInvalidateBufferSubData;
- GrGLFunction<GrGLInvalidateFramebufferProc> fInvalidateFramebuffer;
- GrGLFunction<GrGLInvalidateSubFramebufferProc> fInvalidateSubFramebuffer;
- GrGLFunction<GrGLInvalidateTexImageProc> fInvalidateTexImage;
- GrGLFunction<GrGLInvalidateTexSubImageProc> fInvalidateTexSubImage;
- GrGLFunction<GrGLIsTextureProc> fIsTexture;
- GrGLFunction<GrGLLineWidthProc> fLineWidth;
- GrGLFunction<GrGLLinkProgramProc> fLinkProgram;
- GrGLFunction<GrGLProgramBinaryProc> fProgramBinary;
- GrGLFunction<GrGLProgramParameteriProc> fProgramParameteri;
- GrGLFunction<GrGLMapBufferProc> fMapBuffer;
- GrGLFunction<GrGLMapBufferRangeProc> fMapBufferRange;
- GrGLFunction<GrGLMapBufferSubDataProc> fMapBufferSubData;
- GrGLFunction<GrGLMapTexSubImage2DProc> fMapTexSubImage2D;
- GrGLFunction<GrGLMultiDrawArraysIndirectProc> fMultiDrawArraysIndirect;
- GrGLFunction<GrGLMultiDrawElementsIndirectProc> fMultiDrawElementsIndirect;
- GrGLFunction<GrGLPixelStoreiProc> fPixelStorei;
- GrGLFunction<GrGLPolygonModeProc> fPolygonMode;
- GrGLFunction<GrGLPopGroupMarkerProc> fPopGroupMarker;
- GrGLFunction<GrGLPushGroupMarkerProc> fPushGroupMarker;
- GrGLFunction<GrGLQueryCounterProc> fQueryCounter;
- GrGLFunction<GrGLRasterSamplesProc> fRasterSamples;
- GrGLFunction<GrGLReadBufferProc> fReadBuffer;
- GrGLFunction<GrGLReadPixelsProc> fReadPixels;
- GrGLFunction<GrGLRenderbufferStorageProc> fRenderbufferStorage;
+ GrGLFunction<GrGLActiveTextureFn> fActiveTexture;
+ GrGLFunction<GrGLAttachShaderFn> fAttachShader;
+ GrGLFunction<GrGLBeginQueryFn> fBeginQuery;
+ GrGLFunction<GrGLBindAttribLocationFn> fBindAttribLocation;
+ GrGLFunction<GrGLBindBufferFn> fBindBuffer;
+ GrGLFunction<GrGLBindFragDataLocationFn> fBindFragDataLocation;
+ GrGLFunction<GrGLBindFragDataLocationIndexedFn> fBindFragDataLocationIndexed;
+ GrGLFunction<GrGLBindFramebufferFn> fBindFramebuffer;
+ GrGLFunction<GrGLBindRenderbufferFn> fBindRenderbuffer;
+ GrGLFunction<GrGLBindTextureFn> fBindTexture;
+ GrGLFunction<GrGLBindVertexArrayFn> fBindVertexArray;
+ GrGLFunction<GrGLBlendBarrierFn> fBlendBarrier;
+ GrGLFunction<GrGLBlendColorFn> fBlendColor;
+ GrGLFunction<GrGLBlendEquationFn> fBlendEquation;
+ GrGLFunction<GrGLBlendFuncFn> fBlendFunc;
+ GrGLFunction<GrGLBlitFramebufferFn> fBlitFramebuffer;
+ GrGLFunction<GrGLBufferDataFn> fBufferData;
+ GrGLFunction<GrGLBufferSubDataFn> fBufferSubData;
+ GrGLFunction<GrGLCheckFramebufferStatusFn> fCheckFramebufferStatus;
+ GrGLFunction<GrGLClearFn> fClear;
+ GrGLFunction<GrGLClearColorFn> fClearColor;
+ GrGLFunction<GrGLClearStencilFn> fClearStencil;
+ GrGLFunction<GrGLClearTexImageFn> fClearTexImage;
+ GrGLFunction<GrGLClearTexSubImageFn> fClearTexSubImage;
+ GrGLFunction<GrGLColorMaskFn> fColorMask;
+ GrGLFunction<GrGLCompileShaderFn> fCompileShader;
+ GrGLFunction<GrGLCompressedTexImage2DFn> fCompressedTexImage2D;
+ GrGLFunction<GrGLCompressedTexSubImage2DFn> fCompressedTexSubImage2D;
+ GrGLFunction<GrGLCopyTexSubImage2DFn> fCopyTexSubImage2D;
+ GrGLFunction<GrGLCreateProgramFn> fCreateProgram;
+ GrGLFunction<GrGLCreateShaderFn> fCreateShader;
+ GrGLFunction<GrGLCullFaceFn> fCullFace;
+ GrGLFunction<GrGLDeleteBuffersFn> fDeleteBuffers;
+ GrGLFunction<GrGLDeleteFramebuffersFn> fDeleteFramebuffers;
+ GrGLFunction<GrGLDeleteProgramFn> fDeleteProgram;
+ GrGLFunction<GrGLDeleteQueriesFn> fDeleteQueries;
+ GrGLFunction<GrGLDeleteRenderbuffersFn> fDeleteRenderbuffers;
+ GrGLFunction<GrGLDeleteShaderFn> fDeleteShader;
+ GrGLFunction<GrGLDeleteTexturesFn> fDeleteTextures;
+ GrGLFunction<GrGLDeleteVertexArraysFn> fDeleteVertexArrays;
+ GrGLFunction<GrGLDepthMaskFn> fDepthMask;
+ GrGLFunction<GrGLDisableFn> fDisable;
+ GrGLFunction<GrGLDisableVertexAttribArrayFn> fDisableVertexAttribArray;
+ GrGLFunction<GrGLDrawArraysFn> fDrawArrays;
+ GrGLFunction<GrGLDrawArraysIndirectFn> fDrawArraysIndirect;
+ GrGLFunction<GrGLDrawArraysInstancedFn> fDrawArraysInstanced;
+ GrGLFunction<GrGLDrawBufferFn> fDrawBuffer;
+ GrGLFunction<GrGLDrawBuffersFn> fDrawBuffers;
+ GrGLFunction<GrGLDrawElementsFn> fDrawElements;
+ GrGLFunction<GrGLDrawElementsIndirectFn> fDrawElementsIndirect;
+ GrGLFunction<GrGLDrawElementsInstancedFn> fDrawElementsInstanced;
+ GrGLFunction<GrGLDrawRangeElementsFn> fDrawRangeElements;
+ GrGLFunction<GrGLEnableFn> fEnable;
+ GrGLFunction<GrGLEnableVertexAttribArrayFn> fEnableVertexAttribArray;
+ GrGLFunction<GrGLEndQueryFn> fEndQuery;
+ GrGLFunction<GrGLFinishFn> fFinish;
+ GrGLFunction<GrGLFlushFn> fFlush;
+ GrGLFunction<GrGLFlushMappedBufferRangeFn> fFlushMappedBufferRange;
+ GrGLFunction<GrGLFramebufferRenderbufferFn> fFramebufferRenderbuffer;
+ GrGLFunction<GrGLFramebufferTexture2DFn> fFramebufferTexture2D;
+ GrGLFunction<GrGLFramebufferTexture2DMultisampleFn> fFramebufferTexture2DMultisample;
+ GrGLFunction<GrGLFrontFaceFn> fFrontFace;
+ GrGLFunction<GrGLGenBuffersFn> fGenBuffers;
+ GrGLFunction<GrGLGenFramebuffersFn> fGenFramebuffers;
+ GrGLFunction<GrGLGenerateMipmapFn> fGenerateMipmap;
+ GrGLFunction<GrGLGenQueriesFn> fGenQueries;
+ GrGLFunction<GrGLGenRenderbuffersFn> fGenRenderbuffers;
+ GrGLFunction<GrGLGenTexturesFn> fGenTextures;
+ GrGLFunction<GrGLGenVertexArraysFn> fGenVertexArrays;
+ GrGLFunction<GrGLGetBufferParameterivFn> fGetBufferParameteriv;
+ GrGLFunction<GrGLGetErrorFn> fGetError;
+ GrGLFunction<GrGLGetFramebufferAttachmentParameterivFn> fGetFramebufferAttachmentParameteriv;
+ GrGLFunction<GrGLGetIntegervFn> fGetIntegerv;
+ GrGLFunction<GrGLGetMultisamplefvFn> fGetMultisamplefv;
+ GrGLFunction<GrGLGetProgramBinaryFn> fGetProgramBinary;
+ GrGLFunction<GrGLGetProgramInfoLogFn> fGetProgramInfoLog;
+ GrGLFunction<GrGLGetProgramivFn> fGetProgramiv;
+ GrGLFunction<GrGLGetQueryObjecti64vFn> fGetQueryObjecti64v;
+ GrGLFunction<GrGLGetQueryObjectivFn> fGetQueryObjectiv;
+ GrGLFunction<GrGLGetQueryObjectui64vFn> fGetQueryObjectui64v;
+ GrGLFunction<GrGLGetQueryObjectuivFn> fGetQueryObjectuiv;
+ GrGLFunction<GrGLGetQueryivFn> fGetQueryiv;
+ GrGLFunction<GrGLGetRenderbufferParameterivFn> fGetRenderbufferParameteriv;
+ GrGLFunction<GrGLGetShaderInfoLogFn> fGetShaderInfoLog;
+ GrGLFunction<GrGLGetShaderivFn> fGetShaderiv;
+ GrGLFunction<GrGLGetShaderPrecisionFormatFn> fGetShaderPrecisionFormat;
+ GrGLFunction<GrGLGetStringFn> fGetString;
+ GrGLFunction<GrGLGetStringiFn> fGetStringi;
+ GrGLFunction<GrGLGetTexLevelParameterivFn> fGetTexLevelParameteriv;
+ GrGLFunction<GrGLGetUniformLocationFn> fGetUniformLocation;
+ GrGLFunction<GrGLInsertEventMarkerFn> fInsertEventMarker;
+ GrGLFunction<GrGLInvalidateBufferDataFn> fInvalidateBufferData;
+ GrGLFunction<GrGLInvalidateBufferSubDataFn> fInvalidateBufferSubData;
+ GrGLFunction<GrGLInvalidateFramebufferFn> fInvalidateFramebuffer;
+ GrGLFunction<GrGLInvalidateSubFramebufferFn> fInvalidateSubFramebuffer;
+ GrGLFunction<GrGLInvalidateTexImageFn> fInvalidateTexImage;
+ GrGLFunction<GrGLInvalidateTexSubImageFn> fInvalidateTexSubImage;
+ GrGLFunction<GrGLIsTextureFn> fIsTexture;
+ GrGLFunction<GrGLLineWidthFn> fLineWidth;
+ GrGLFunction<GrGLLinkProgramFn> fLinkProgram;
+ GrGLFunction<GrGLProgramBinaryFn> fProgramBinary;
+ GrGLFunction<GrGLProgramParameteriFn> fProgramParameteri;
+ GrGLFunction<GrGLMapBufferFn> fMapBuffer;
+ GrGLFunction<GrGLMapBufferRangeFn> fMapBufferRange;
+ GrGLFunction<GrGLMapBufferSubDataFn> fMapBufferSubData;
+ GrGLFunction<GrGLMapTexSubImage2DFn> fMapTexSubImage2D;
+ GrGLFunction<GrGLMultiDrawArraysIndirectFn> fMultiDrawArraysIndirect;
+ GrGLFunction<GrGLMultiDrawElementsIndirectFn> fMultiDrawElementsIndirect;
+ GrGLFunction<GrGLPixelStoreiFn> fPixelStorei;
+ GrGLFunction<GrGLPolygonModeFn> fPolygonMode;
+ GrGLFunction<GrGLPopGroupMarkerFn> fPopGroupMarker;
+ GrGLFunction<GrGLPushGroupMarkerFn> fPushGroupMarker;
+ GrGLFunction<GrGLQueryCounterFn> fQueryCounter;
+ GrGLFunction<GrGLRasterSamplesFn> fRasterSamples;
+ GrGLFunction<GrGLReadBufferFn> fReadBuffer;
+ GrGLFunction<GrGLReadPixelsFn> fReadPixels;
+ GrGLFunction<GrGLRenderbufferStorageFn> fRenderbufferStorage;
// On OpenGL ES there are multiple incompatible extensions that add support for MSAA
// and ES3 adds MSAA support to the standard. On an ES3 driver we may still use the
@@ -212,127 +212,127 @@ public:
// functionality.
// GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled_render_to_texture
- GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2EXT;
+ GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisampleES2EXT;
// GL_APPLE_framebuffer_multisample
- GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2APPLE;
+ GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisampleES2APPLE;
// This is used to store the pointer for GL_ARB/EXT/ANGLE/CHROMIUM_framebuffer_multisample or
// the standard function in ES3+ or GL 3.0+.
- GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisample;
+ GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisample;
// Pointer to BindUniformLocationCHROMIUM from the GL_CHROMIUM_bind_uniform_location extension.
- GrGLFunction<GrGLBindUniformLocationProc> fBindUniformLocation;
+ GrGLFunction<GrGLBindUniformLocationFn> fBindUniformLocation;
- GrGLFunction<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer;
- GrGLFunction<GrGLScissorProc> fScissor;
- GrGLFunction<GrGLShaderSourceProc> fShaderSource;
- GrGLFunction<GrGLStencilFuncProc> fStencilFunc;
- GrGLFunction<GrGLStencilFuncSeparateProc> fStencilFuncSeparate;
- GrGLFunction<GrGLStencilMaskProc> fStencilMask;
- GrGLFunction<GrGLStencilMaskSeparateProc> fStencilMaskSeparate;
- GrGLFunction<GrGLStencilOpProc> fStencilOp;
- GrGLFunction<GrGLStencilOpSeparateProc> fStencilOpSeparate;
- GrGLFunction<GrGLTexBufferProc> fTexBuffer;
- GrGLFunction<GrGLTexBufferRangeProc> fTexBufferRange;
- GrGLFunction<GrGLTexImage2DProc> fTexImage2D;
- GrGLFunction<GrGLTexParameteriProc> fTexParameteri;
- GrGLFunction<GrGLTexParameterivProc> fTexParameteriv;
- GrGLFunction<GrGLTexSubImage2DProc> fTexSubImage2D;
- GrGLFunction<GrGLTexStorage2DProc> fTexStorage2D;
- GrGLFunction<GrGLTextureBarrierProc> fTextureBarrier;
- GrGLFunction<GrGLDiscardFramebufferProc> fDiscardFramebuffer;
- GrGLFunction<GrGLUniform1fProc> fUniform1f;
- GrGLFunction<GrGLUniform1iProc> fUniform1i;
- GrGLFunction<GrGLUniform1fvProc> fUniform1fv;
- GrGLFunction<GrGLUniform1ivProc> fUniform1iv;
- GrGLFunction<GrGLUniform2fProc> fUniform2f;
- GrGLFunction<GrGLUniform2iProc> fUniform2i;
- GrGLFunction<GrGLUniform2fvProc> fUniform2fv;
- GrGLFunction<GrGLUniform2ivProc> fUniform2iv;
- GrGLFunction<GrGLUniform3fProc> fUniform3f;
- GrGLFunction<GrGLUniform3iProc> fUniform3i;
- GrGLFunction<GrGLUniform3fvProc> fUniform3fv;
- GrGLFunction<GrGLUniform3ivProc> fUniform3iv;
- GrGLFunction<GrGLUniform4fProc> fUniform4f;
- GrGLFunction<GrGLUniform4iProc> fUniform4i;
- GrGLFunction<GrGLUniform4fvProc> fUniform4fv;
- GrGLFunction<GrGLUniform4ivProc> fUniform4iv;
- GrGLFunction<GrGLUniformMatrix2fvProc> fUniformMatrix2fv;
- GrGLFunction<GrGLUniformMatrix3fvProc> fUniformMatrix3fv;
- GrGLFunction<GrGLUniformMatrix4fvProc> fUniformMatrix4fv;
- GrGLFunction<GrGLUnmapBufferProc> fUnmapBuffer;
- GrGLFunction<GrGLUnmapBufferSubDataProc> fUnmapBufferSubData;
- GrGLFunction<GrGLUnmapTexSubImage2DProc> fUnmapTexSubImage2D;
- GrGLFunction<GrGLUseProgramProc> fUseProgram;
- GrGLFunction<GrGLVertexAttrib1fProc> fVertexAttrib1f;
- GrGLFunction<GrGLVertexAttrib2fvProc> fVertexAttrib2fv;
- GrGLFunction<GrGLVertexAttrib3fvProc> fVertexAttrib3fv;
- GrGLFunction<GrGLVertexAttrib4fvProc> fVertexAttrib4fv;
- GrGLFunction<GrGLVertexAttribDivisorProc> fVertexAttribDivisor;
- GrGLFunction<GrGLVertexAttribIPointerProc> fVertexAttribIPointer;
- GrGLFunction<GrGLVertexAttribPointerProc> fVertexAttribPointer;
- GrGLFunction<GrGLViewportProc> fViewport;
+ GrGLFunction<GrGLResolveMultisampleFramebufferFn> fResolveMultisampleFramebuffer;
+ GrGLFunction<GrGLScissorFn> fScissor;
+ GrGLFunction<GrGLShaderSourceFn> fShaderSource;
+ GrGLFunction<GrGLStencilFuncFn> fStencilFunc;
+ GrGLFunction<GrGLStencilFuncSeparateFn> fStencilFuncSeparate;
+ GrGLFunction<GrGLStencilMaskFn> fStencilMask;
+ GrGLFunction<GrGLStencilMaskSeparateFn> fStencilMaskSeparate;
+ GrGLFunction<GrGLStencilOpFn> fStencilOp;
+ GrGLFunction<GrGLStencilOpSeparateFn> fStencilOpSeparate;
+ GrGLFunction<GrGLTexBufferFn> fTexBuffer;
+ GrGLFunction<GrGLTexBufferRangeFn> fTexBufferRange;
+ GrGLFunction<GrGLTexImage2DFn> fTexImage2D;
+ GrGLFunction<GrGLTexParameteriFn> fTexParameteri;
+ GrGLFunction<GrGLTexParameterivFn> fTexParameteriv;
+ GrGLFunction<GrGLTexSubImage2DFn> fTexSubImage2D;
+ GrGLFunction<GrGLTexStorage2DFn> fTexStorage2D;
+ GrGLFunction<GrGLTextureBarrierFn> fTextureBarrier;
+ GrGLFunction<GrGLDiscardFramebufferFn> fDiscardFramebuffer;
+ GrGLFunction<GrGLUniform1fFn> fUniform1f;
+ GrGLFunction<GrGLUniform1iFn> fUniform1i;
+ GrGLFunction<GrGLUniform1fvFn> fUniform1fv;
+ GrGLFunction<GrGLUniform1ivFn> fUniform1iv;
+ GrGLFunction<GrGLUniform2fFn> fUniform2f;
+ GrGLFunction<GrGLUniform2iFn> fUniform2i;
+ GrGLFunction<GrGLUniform2fvFn> fUniform2fv;
+ GrGLFunction<GrGLUniform2ivFn> fUniform2iv;
+ GrGLFunction<GrGLUniform3fFn> fUniform3f;
+ GrGLFunction<GrGLUniform3iFn> fUniform3i;
+ GrGLFunction<GrGLUniform3fvFn> fUniform3fv;
+ GrGLFunction<GrGLUniform3ivFn> fUniform3iv;
+ GrGLFunction<GrGLUniform4fFn> fUniform4f;
+ GrGLFunction<GrGLUniform4iFn> fUniform4i;
+ GrGLFunction<GrGLUniform4fvFn> fUniform4fv;
+ GrGLFunction<GrGLUniform4ivFn> fUniform4iv;
+ GrGLFunction<GrGLUniformMatrix2fvFn> fUniformMatrix2fv;
+ GrGLFunction<GrGLUniformMatrix3fvFn> fUniformMatrix3fv;
+ GrGLFunction<GrGLUniformMatrix4fvFn> fUniformMatrix4fv;
+ GrGLFunction<GrGLUnmapBufferFn> fUnmapBuffer;
+ GrGLFunction<GrGLUnmapBufferSubDataFn> fUnmapBufferSubData;
+ GrGLFunction<GrGLUnmapTexSubImage2DFn> fUnmapTexSubImage2D;
+ GrGLFunction<GrGLUseProgramFn> fUseProgram;
+ GrGLFunction<GrGLVertexAttrib1fFn> fVertexAttrib1f;
+ GrGLFunction<GrGLVertexAttrib2fvFn> fVertexAttrib2fv;
+ GrGLFunction<GrGLVertexAttrib3fvFn> fVertexAttrib3fv;
+ GrGLFunction<GrGLVertexAttrib4fvFn> fVertexAttrib4fv;
+ GrGLFunction<GrGLVertexAttribDivisorFn> fVertexAttribDivisor;
+ GrGLFunction<GrGLVertexAttribIPointerFn> fVertexAttribIPointer;
+ GrGLFunction<GrGLVertexAttribPointerFn> fVertexAttribPointer;
+ GrGLFunction<GrGLViewportFn> fViewport;
/* GL_NV_path_rendering */
- GrGLFunction<GrGLMatrixLoadfProc> fMatrixLoadf;
- GrGLFunction<GrGLMatrixLoadIdentityProc> fMatrixLoadIdentity;
- GrGLFunction<GrGLGetProgramResourceLocationProc> fGetProgramResourceLocation;
- GrGLFunction<GrGLPathCommandsProc> fPathCommands;
- GrGLFunction<GrGLPathParameteriProc> fPathParameteri;
- GrGLFunction<GrGLPathParameterfProc> fPathParameterf;
- GrGLFunction<GrGLGenPathsProc> fGenPaths;
- GrGLFunction<GrGLDeletePathsProc> fDeletePaths;
- GrGLFunction<GrGLIsPathProc> fIsPath;
- GrGLFunction<GrGLPathStencilFuncProc> fPathStencilFunc;
- GrGLFunction<GrGLStencilFillPathProc> fStencilFillPath;
- GrGLFunction<GrGLStencilStrokePathProc> fStencilStrokePath;
- GrGLFunction<GrGLStencilFillPathInstancedProc> fStencilFillPathInstanced;
- GrGLFunction<GrGLStencilStrokePathInstancedProc> fStencilStrokePathInstanced;
- GrGLFunction<GrGLCoverFillPathProc> fCoverFillPath;
- GrGLFunction<GrGLCoverStrokePathProc> fCoverStrokePath;
- GrGLFunction<GrGLCoverFillPathInstancedProc> fCoverFillPathInstanced;
- GrGLFunction<GrGLCoverStrokePathInstancedProc> fCoverStrokePathInstanced;
+ GrGLFunction<GrGLMatrixLoadfFn> fMatrixLoadf;
+ GrGLFunction<GrGLMatrixLoadIdentityFn> fMatrixLoadIdentity;
+ GrGLFunction<GrGLGetProgramResourceLocationFn> fGetProgramResourceLocation;
+ GrGLFunction<GrGLPathCommandsFn> fPathCommands;
+ GrGLFunction<GrGLPathParameteriFn> fPathParameteri;
+ GrGLFunction<GrGLPathParameterfFn> fPathParameterf;
+ GrGLFunction<GrGLGenPathsFn> fGenPaths;
+ GrGLFunction<GrGLDeletePathsFn> fDeletePaths;
+ GrGLFunction<GrGLIsPathFn> fIsPath;
+ GrGLFunction<GrGLPathStencilFuncFn> fPathStencilFunc;
+ GrGLFunction<GrGLStencilFillPathFn> fStencilFillPath;
+ GrGLFunction<GrGLStencilStrokePathFn> fStencilStrokePath;
+ GrGLFunction<GrGLStencilFillPathInstancedFn> fStencilFillPathInstanced;
+ GrGLFunction<GrGLStencilStrokePathInstancedFn> fStencilStrokePathInstanced;
+ GrGLFunction<GrGLCoverFillPathFn> fCoverFillPath;
+ GrGLFunction<GrGLCoverStrokePathFn> fCoverStrokePath;
+ GrGLFunction<GrGLCoverFillPathInstancedFn> fCoverFillPathInstanced;
+ GrGLFunction<GrGLCoverStrokePathInstancedFn> fCoverStrokePathInstanced;
// NV_path_rendering v1.2
- GrGLFunction<GrGLStencilThenCoverFillPathProc> fStencilThenCoverFillPath;
- GrGLFunction<GrGLStencilThenCoverStrokePathProc> fStencilThenCoverStrokePath;
- GrGLFunction<GrGLStencilThenCoverFillPathInstancedProc> fStencilThenCoverFillPathInstanced;
- GrGLFunction<GrGLStencilThenCoverStrokePathInstancedProc> fStencilThenCoverStrokePathInstanced;
+ GrGLFunction<GrGLStencilThenCoverFillPathFn> fStencilThenCoverFillPath;
+ GrGLFunction<GrGLStencilThenCoverStrokePathFn> fStencilThenCoverStrokePath;
+ GrGLFunction<GrGLStencilThenCoverFillPathInstancedFn> fStencilThenCoverFillPathInstanced;
+ GrGLFunction<GrGLStencilThenCoverStrokePathInstancedFn> fStencilThenCoverStrokePathInstanced;
// NV_path_rendering v1.3
- GrGLFunction<GrGLProgramPathFragmentInputGenProc> fProgramPathFragmentInputGen;
+ GrGLFunction<GrGLProgramPathFragmentInputGenFn> fProgramPathFragmentInputGen;
// CHROMIUM_path_rendering
- GrGLFunction<GrGLBindFragmentInputLocationProc> fBindFragmentInputLocation;
+ GrGLFunction<GrGLBindFragmentInputLocationFn> fBindFragmentInputLocation;
/* NV_framebuffer_mixed_samples */
- GrGLFunction<GrGLCoverageModulationProc> fCoverageModulation;
+ GrGLFunction<GrGLCoverageModulationFn> fCoverageModulation;
/* ARB_sample_shading */
- GrGLFunction<GrGLMinSampleShadingProc> fMinSampleShading;
+ GrGLFunction<GrGLMinSampleShadingFn> fMinSampleShading;
/* ARB_sync */
- GrGLFunction<GrGLFenceSyncProc> fFenceSync;
- GrGLFunction<GrGLIsSyncProc> fIsSync;
- GrGLFunction<GrGLClientWaitSyncProc> fClientWaitSync;
- GrGLFunction<GrGLWaitSyncProc> fWaitSync;
- GrGLFunction<GrGLDeleteSyncProc> fDeleteSync;
+ GrGLFunction<GrGLFenceSyncFn> fFenceSync;
+ GrGLFunction<GrGLIsSyncFn> fIsSync;
+ GrGLFunction<GrGLClientWaitSyncFn> fClientWaitSync;
+ GrGLFunction<GrGLWaitSyncFn> fWaitSync;
+ GrGLFunction<GrGLDeleteSyncFn> fDeleteSync;
/* ARB_internalforamt_query */
- GrGLFunction<GrGLGetInternalformativProc> fGetInternalformativ;
+ GrGLFunction<GrGLGetInternalformativFn> fGetInternalformativ;
/* KHR_debug */
- GrGLFunction<GrGLDebugMessageControlProc> fDebugMessageControl;
- GrGLFunction<GrGLDebugMessageInsertProc> fDebugMessageInsert;
- GrGLFunction<GrGLDebugMessageCallbackProc> fDebugMessageCallback;
- GrGLFunction<GrGLGetDebugMessageLogProc> fGetDebugMessageLog;
- GrGLFunction<GrGLPushDebugGroupProc> fPushDebugGroup;
- GrGLFunction<GrGLPopDebugGroupProc> fPopDebugGroup;
- GrGLFunction<GrGLObjectLabelProc> fObjectLabel;
+ GrGLFunction<GrGLDebugMessageControlFn> fDebugMessageControl;
+ GrGLFunction<GrGLDebugMessageInsertFn> fDebugMessageInsert;
+ GrGLFunction<GrGLDebugMessageCallbackFn> fDebugMessageCallback;
+ GrGLFunction<GrGLGetDebugMessageLogFn> fGetDebugMessageLog;
+ GrGLFunction<GrGLPushDebugGroupFn> fPushDebugGroup;
+ GrGLFunction<GrGLPopDebugGroupFn> fPopDebugGroup;
+ GrGLFunction<GrGLObjectLabelFn> fObjectLabel;
/* EXT_window_rectangles */
- GrGLFunction<GrGLWindowRectanglesProc> fWindowRectangles;
+ GrGLFunction<GrGLWindowRectanglesFn> fWindowRectangles;
/* EGL functions */
- GrGLFunction<GrEGLCreateImageProc> fEGLCreateImage;
- GrGLFunction<GrEGLDestroyImageProc> fEGLDestroyImage;
+ GrGLFunction<GrEGLCreateImageFn> fEGLCreateImage;
+ GrGLFunction<GrEGLDestroyImageFn> fEGLDestroyImage;
} fFunctions;
#if GR_TEST_UTILS
diff --git a/chromium/third_party/skia/src/gpu/gl/GrGLAssembleInterface.cpp b/chromium/third_party/skia/src/gpu/gl/GrGLAssembleInterface.cpp
index 5c5e05a1667..06e20ac716a 100644
--- a/chromium/third_party/skia/src/gpu/gl/GrGLAssembleInterface.cpp
+++ b/chromium/third_party/skia/src/gpu/gl/GrGLAssembleInterface.cpp
@@ -9,11 +9,11 @@
#include "gl/GrGLAssembleInterface.h"
#include "GrGLUtil.h"
-#define GET_PROC(F) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "gl" #F)
-#define GET_PROC_SUFFIX(F, S) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "gl" #F #S)
-#define GET_PROC_LOCAL(F) GrGL ## F ## Proc F = (GrGL ## F ## Proc) get(ctx, "gl" #F)
+#define GET_PROC(F) functions->f##F = (GrGL##F##Fn*)get(ctx, "gl" #F)
+#define GET_PROC_SUFFIX(F, S) functions->f##F = (GrGL##F##Fn*)get(ctx, "gl" #F #S)
+#define GET_PROC_LOCAL(F) GrGL##F##Fn* F = (GrGL##F##Fn*)get(ctx, "gl" #F)
-#define GET_EGL_PROC_SUFFIX(F, S) functions->fEGL ## F = (GrEGL ## F ## Proc) get(ctx, "egl" #F #S)
+#define GET_EGL_PROC_SUFFIX(F, S) functions->fEGL##F = (GrEGL##F##Fn*)get(ctx, "egl" #F #S)
sk_sp<const GrGLInterface> GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get) {
GET_PROC_LOCAL(GetString);
@@ -36,13 +36,13 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get
return nullptr;
}
-static void get_egl_query_and_display(GrEGLQueryStringProc* queryString, GrEGLDisplay* display,
+static void get_egl_query_and_display(GrEGLQueryStringFn** queryString, GrEGLDisplay* display,
void* ctx, GrGLGetProc get) {
- *queryString = (GrEGLQueryStringProc) get(ctx, "eglQueryString");
+ *queryString = (GrEGLQueryStringFn*)get(ctx, "eglQueryString");
*display = GR_EGL_NO_DISPLAY;
if (*queryString) {
- GrEGLGetCurrentDisplayProc getCurrentDisplay =
- (GrEGLGetCurrentDisplayProc) get(ctx, "eglGetCurrentDisplay");
+ GrEGLGetCurrentDisplayFn* getCurrentDisplay =
+ (GrEGLGetCurrentDisplayFn*)get(ctx, "eglGetCurrentDisplay");
if (getCurrentDisplay) {
*display = getCurrentDisplay();
} else {
@@ -69,7 +69,7 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc g
return nullptr;
}
- GrEGLQueryStringProc queryString;
+ GrEGLQueryStringFn* queryString;
GrEGLDisplay display;
get_egl_query_and_display(&queryString, &display, ctx, get);
GrGLExtensions extensions;
@@ -429,7 +429,7 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc
GET_PROC_LOCAL(GetIntegerv);
GET_PROC_LOCAL(GetStringi);
- GrEGLQueryStringProc queryString;
+ GrEGLQueryStringFn* queryString;
GrEGLDisplay display;
get_egl_query_and_display(&queryString, &display, ctx, get);
GrGLExtensions extensions;
@@ -666,12 +666,18 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc
if (extensions.has("GL_EXT_multisampled_render_to_texture")) {
GET_PROC_SUFFIX(FramebufferTexture2DMultisample, EXT);
- functions->fRenderbufferStorageMultisampleES2EXT = (GrGLRenderbufferStorageMultisampleProc) get(ctx, "glRenderbufferStorageMultisampleEXT");
+ functions->fRenderbufferStorageMultisampleES2EXT =
+ (GrGLRenderbufferStorageMultisampleFn*)get(ctx,
+ "glRenderbufferStorageMultisampleEXT");
} else if (extensions.has("GL_IMG_multisampled_render_to_texture")) {
GET_PROC_SUFFIX(FramebufferTexture2DMultisample, IMG);
- functions->fRenderbufferStorageMultisampleES2EXT = (GrGLRenderbufferStorageMultisampleProc) get(ctx, "glRenderbufferStorageMultisampleIMG");
+ functions->fRenderbufferStorageMultisampleES2EXT =
+ (GrGLRenderbufferStorageMultisampleFn*)get(ctx,
+ "glRenderbufferStorageMultisampleIMG");
} else if (extensions.has("GL_APPLE_framebuffer_multisample")) {
- functions->fRenderbufferStorageMultisampleES2APPLE = (GrGLRenderbufferStorageMultisampleProc) get(ctx, "glRenderbufferStorageMultisampleAPPLE");
+ functions->fRenderbufferStorageMultisampleES2APPLE =
+ (GrGLRenderbufferStorageMultisampleFn*)get(ctx,
+ "glRenderbufferStorageMultisampleAPPLE");
GET_PROC_SUFFIX(ResolveMultisampleFramebuffer, APPLE);
}
diff --git a/chromium/third_party/skia/src/gpu/gl/GrGLExtensions.cpp b/chromium/third_party/skia/src/gpu/gl/GrGLExtensions.cpp
index 6530eaf899e..b6898c4f40e 100644
--- a/chromium/third_party/skia/src/gpu/gl/GrGLExtensions.cpp
+++ b/chromium/third_party/skia/src/gpu/gl/GrGLExtensions.cpp
@@ -66,10 +66,10 @@ static void eat_space_sep_strings(SkTArray<SkString>* out, const char in[]) {
}
bool GrGLExtensions::init(GrGLStandard standard,
- GrGLFunction<GrGLGetStringProc> getString,
- GrGLFunction<GrGLGetStringiProc> getStringi,
- GrGLFunction<GrGLGetIntegervProc> getIntegerv,
- GrGLFunction<GrEGLQueryStringProc> queryString,
+ GrGLFunction<GrGLGetStringFn> getString,
+ GrGLFunction<GrGLGetStringiFn> getStringi,
+ GrGLFunction<GrGLGetIntegervFn> getIntegerv,
+ GrGLFunction<GrEGLQueryStringFn> queryString,
GrEGLDisplay eglDisplay) {
fInitialized = false;
fStrings.reset();
diff --git a/chromium/third_party/skia/src/gpu/gl/GrGLTestInterface.cpp b/chromium/third_party/skia/src/gpu/gl/GrGLTestInterface.cpp
index 38740482f38..e44deecf902 100644
--- a/chromium/third_party/skia/src/gpu/gl/GrGLTestInterface.cpp
+++ b/chromium/third_party/skia/src/gpu/gl/GrGLTestInterface.cpp
@@ -8,11 +8,11 @@
#include "GrGLTestInterface.h"
namespace {
- template<typename R, typename... A>
- GrGLFunction<R(*)(A...)> bind_to_member(GrGLTestInterface* interface,
- R (GrGLTestInterface::*member)(A...)) {
- return [interface, member] (A... a) -> R { return (interface->*member)(a...); };
- }
+template <typename R, typename... A>
+GrGLFunction<R GR_GL_FUNCTION_TYPE(A...)> bind_to_member(GrGLTestInterface* interface,
+ R (GrGLTestInterface::*member)(A...)) {
+ return [interface, member](A... a) -> R { return (interface->*member)(a...); };
+}
} // anonymous namespace
GrGLTestInterface::GrGLTestInterface() {
diff --git a/chromium/third_party/skia/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp b/chromium/third_party/skia/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp
index 2a2ceddc96f..3b5951f502c 100644
--- a/chromium/third_party/skia/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp
+++ b/chromium/third_party/skia/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp
@@ -72,7 +72,7 @@ sk_sp<const GrGLInterface> GrGLMakeNativeInterface() {
return nullptr;
}
- GrGLGetStringProc getString = (GrGLGetStringProc)getter.getProc("glGetString");
+ GrGLGetStringFn* getString = (GrGLGetStringFn*)getter.getProc("glGetString");
if (nullptr == getString) {
return nullptr;
}