author Andrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 12 Oct 2017 12:24:05 -0400
changeset 386806 5a44c9c16c21e3d1a285a97be2447c9c9e2f1f98
parent 324961 47e2650093d575c5042b43feb0575ef9678352b1
child 448947 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1297515 - Always use the mozharness vendored copy of virtualenv, r=jlund This removes the option to pass in a custom virtualenv binary and gets mozharness to always use the copy in 'external_tools'. Because this is now deterministic, we don't need to do things like check what version of pip is being used. MozReview-Commit-ID: GWxkmaZVpsZ

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#include "mozilla/gfx/2D.h"
#include "Units.h"

namespace mozilla {
namespace widget {

// A class for drawing to double-buffered windows.
class WindowSurface {
  virtual ~WindowSurface() {}

  // Locks a region of the window for drawing, returning a draw target
  // capturing the bounds of the provided region.
  // Implementations must permit invocation from any thread.
  virtual already_AddRefed<gfx::DrawTarget> Lock(const LayoutDeviceIntRegion& aRegion) = 0;

  // Swaps the provided invalid region from the back buffer to the window.
  // Implementations must permit invocation from any thread.
  virtual void Commit(const LayoutDeviceIntRegion& aInvalidRegion) = 0;

  // Whether the window surface represents a fallback method.
  virtual bool IsFallback() const { return false; }

}  // namespace widget
}  // namespace mozilla