Verified Commit b934ab2f authored by Lee Salzman's avatar Lee Salzman Committed by ma1
Browse files

Bug 2025369. a=RyanVM DONTBUILD

parent 2cc56156
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1353,7 +1353,12 @@ void SharedContextWebgl::ResetPathVertexBuffer() {
  mPathVertexOffset = sizeof(kRectVertexData);

  size_t newCapacity = mPathVertexBuffer->ByteLength();
  if (newCapacity > 0) {
    AddUntrackedTextureMemory(newCapacity);
  } else {
    mPathVertexCapacity = 0;
    mPathVertexOffset = 0;
  }

  if (mWGROutputBuffer &&
      (!mPathVertexCapacity || newCapacity != oldCapacity)) {
@@ -4997,7 +5002,10 @@ bool DrawTargetWebgl::UsageProfile::RequiresRefresh() const {
}

void SharedContextWebgl::CachePrefs() {
  uint32_t capacity = StaticPrefs::gfx_canvas_accelerated_gpu_path_size() << 20;
  uint32_t capacity =
      std::min(StaticPrefs::gfx_canvas_accelerated_gpu_path_size(),
               uint32_t(INT32_MAX) >> 20)
      << 20;
  if (capacity != mPathVertexCapacity) {
    mPathVertexCapacity = capacity;
    if (mPathCache) {