author cku <cku@mozilla.com>
Fri, 05 May 2017 17:19:43 +0800
changeset 359137 f3460d42d23cb21093146a2ace98009d581bd77a
parent 349752 ace97d197b699443091db818a2e18222a7065bb0
child 370009 abfd88baf39108831d7a9337f841ecb623b5594c
permissions -rw-r--r--
Bug 1351440 - Part 2. Encapsulate DrawResult and imgIContainer::FLAG_* into imgDrawingParams, and pass it to PaintSVG. r=jwatt The DrawResult return was not in fact anything to do with the success or failure of that method, but was actually passing out a very specific piece of information about the success or failure of any imagelib drawing that may not have occurred under the various PaintSVG calls. The signature of PaintSVG is changed from DrawResult PaintSVG(...., uint32 flags); to void PaintSVG(...., imgDrawingParams& aPackage); imgDrawingParams wraps DrawResult and imgIContainer::FLAG_* as a pack, pass through PaintSVG to imagelib draw calls under beneath. MozReview-Commit-ID: IOq2evUAOQF

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * vim: sw=2 ts=8 et :
/* 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/. */

#ifndef nsBaseScreen_h
#define nsBaseScreen_h

#include "mozilla/Attributes.h"
#include "nsIScreen.h"

class nsBaseScreen : public nsIScreen


  // nsIScreen interface

  // These simply forward to the device-pixel versions;
  // implementations where desktop pixels may not correspond
  // to per-screen device pixels must override.
  NS_IMETHOD GetRectDisplayPix(int32_t *outLeft,  int32_t *outTop,
                               int32_t *outWidth, int32_t *outHeight) override;
  NS_IMETHOD GetAvailRectDisplayPix(int32_t *outLeft,  int32_t *outTop,
                                    int32_t *outWidth, int32_t *outHeight) override;

  NS_IMETHOD GetContentsScaleFactor(double* aContentsScaleFactor) override;

  NS_IMETHOD GetDefaultCSSScaleFactor(double* aScaleFactor) override;

  virtual ~nsBaseScreen();

#endif // nsBaseScreen_h