mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 1351783 part 1 - Add includes for unified build issues. r=kats
MozReview-Commit-ID: D57bbW4pmPZ --HG-- extra : rebase_source : 9af2973a112c7ea641876c1f945797f2c7c945ce
This commit is contained in:
parent
d5cffb7895
commit
cfc792bc4c
@ -17,6 +17,7 @@
|
||||
#include "nsRect.h" // for mozilla::gfx::IntRect
|
||||
#include "nsRegion.h" // for nsIntRegion
|
||||
#include "mozilla/gfx/PathHelpers.h"
|
||||
#include "mozilla/gfx/Helpers.h"
|
||||
#include "nsDisplayList.h" // for nsDisplayItem
|
||||
#include "nsCaret.h"
|
||||
|
||||
|
@ -120,7 +120,7 @@ protected:
|
||||
uint32_t GetPaintFlags();
|
||||
void UpdateContentClient(PaintState& aState);
|
||||
bool UpdatePaintRegion(PaintState& aState);
|
||||
void PaintOffMainThread(DrawTargetCapture* aCapture);
|
||||
void PaintOffMainThread(gfx::DrawTargetCapture* aCapture);
|
||||
already_AddRefed<gfx::DrawTargetCapture> CapturePaintedContent();
|
||||
|
||||
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mozilla/EnumeratedArray.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include <string>
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
#include "ContainerLayerMLGPU.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "LayersLogging.h"
|
||||
#include "LayerManagerMLGPU.h"
|
||||
#include "MLGDevice.h"
|
||||
#include "mozilla/gfx/Types.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
@ -38,7 +40,7 @@ ContainerLayerMLGPU::OnPrepareToRender(FrameBuilder* aBuilder)
|
||||
mRenderTarget = nullptr;
|
||||
}
|
||||
|
||||
IntRect viewport(IntPoint(0, 0), mTargetSize);
|
||||
gfx::IntRect viewport(gfx::IntPoint(0, 0), mTargetSize);
|
||||
if (!mRenderTarget || !gfxPrefs::AdvancedLayersUseInvalidation()) {
|
||||
// Fine-grained invalidation is disabled, invalidate everything.
|
||||
mInvalidRect = viewport;
|
||||
@ -70,15 +72,15 @@ ContainerLayerMLGPU::SetInvalidCompositeRect(const gfx::IntRect& aRect)
|
||||
{
|
||||
// For simplicity we only track the bounds of the invalid area, since regions
|
||||
// are expensive. We can adjust this in the future if needed.
|
||||
IntRect bounds = aRect;
|
||||
gfx::IntRect bounds = aRect;
|
||||
bounds.MoveBy(-GetTargetOffset());
|
||||
|
||||
// Note we add the bounds to the invalid rect from the last frame, since we
|
||||
// only clear the area that we actually paint.
|
||||
if (Maybe<IntRect> result = mInvalidRect.SafeUnion(bounds)) {
|
||||
if (Maybe<gfx::IntRect> result = mInvalidRect.SafeUnion(bounds)) {
|
||||
mInvalidRect = result.value();
|
||||
} else {
|
||||
mInvalidRect = IntRect(IntPoint(0, 0), GetTargetSize());
|
||||
mInvalidRect = gfx::IntRect(gfx::IntPoint(0, 0), GetTargetSize());
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,7 +93,7 @@ ContainerLayerMLGPU::ClearCachedResources()
|
||||
bool
|
||||
ContainerLayerMLGPU::IsContentOpaque()
|
||||
{
|
||||
if (GetMixBlendMode() != CompositionOp::OP_OVER) {
|
||||
if (GetMixBlendMode() != gfx::CompositionOp::OP_OVER) {
|
||||
// We need to read from what's underneath us, so we consider our content to
|
||||
// be not opaque.
|
||||
return false;
|
||||
|
@ -7,10 +7,13 @@
|
||||
#define mozilla_gfx_layers_mlgpu_ContainerLayerMLGPU_h
|
||||
|
||||
#include "LayerMLGPU.h"
|
||||
#include "MLGDeviceTypes.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
class MLGDevice;
|
||||
|
||||
class ContainerLayerMLGPU final : public ContainerLayer
|
||||
, public LayerMLGPU
|
||||
{
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include "MaskOperation.h"
|
||||
#include "RenderPassMLGPU.h"
|
||||
#include "RenderViewMLGPU.h"
|
||||
#include "mozilla/gfx/Polygon.h"
|
||||
#include "mozilla/layers/BSPTree.h"
|
||||
#include "mozilla/layers/LayersHelpers.h"
|
||||
|
||||
namespace mozilla {
|
||||
@ -63,7 +65,7 @@ FrameBuilder::Build()
|
||||
|
||||
// Traverse the layer tree and assign each layer to tiles.
|
||||
{
|
||||
Maybe<Polygon> geometry;
|
||||
Maybe<gfx::Polygon> geometry;
|
||||
RenderTargetIntRect clip(0, 0, target->GetSize().width, target->GetSize().height);
|
||||
|
||||
AssignLayer(mRoot->GetLayer(), mWidgetRenderView, clip, Move(geometry));
|
||||
@ -109,7 +111,7 @@ void
|
||||
FrameBuilder::AssignLayer(Layer* aLayer,
|
||||
RenderViewMLGPU* aView,
|
||||
const RenderTargetIntRect& aClipRect,
|
||||
Maybe<Polygon>&& aGeometry)
|
||||
Maybe<gfx::Polygon>&& aGeometry)
|
||||
{
|
||||
LayerMLGPU* layer = aLayer->AsHostLayer()->AsLayerMLGPU();
|
||||
|
||||
@ -156,8 +158,8 @@ FrameBuilder::ProcessContainerLayer(ContainerLayer* aContainer,
|
||||
// or traverse it. Note that we do not pass the geometry here. Otherwise
|
||||
// we could decide the particular split is not visible, and because of the
|
||||
// check above, never bother traversing the container again.
|
||||
IntRect boundingBox = layer->GetClippedBoundingBox(aView, Nothing());
|
||||
const IntRect& invalidRect = aView->GetInvalidRect();
|
||||
gfx::IntRect boundingBox = layer->GetClippedBoundingBox(aView, Nothing());
|
||||
const gfx::IntRect& invalidRect = aView->GetInvalidRect();
|
||||
if (boundingBox.IsEmpty() || !invalidRect.Intersects(boundingBox)) {
|
||||
return false;
|
||||
}
|
||||
@ -191,7 +193,7 @@ void
|
||||
FrameBuilder::ProcessChildList(ContainerLayer* aContainer,
|
||||
RenderViewMLGPU* aView,
|
||||
const RenderTargetIntRect& aParentClipRect,
|
||||
const Maybe<Polygon>& aParentGeometry)
|
||||
const Maybe<gfx::Polygon>& aParentGeometry)
|
||||
{
|
||||
nsTArray<LayerPolygon> polygons =
|
||||
aContainer->SortChildrenBy3DZOrder(ContainerLayer::SortMode::WITH_GEOMETRY);
|
||||
@ -209,7 +211,7 @@ FrameBuilder::ProcessChildList(ContainerLayer* aContainer,
|
||||
continue;
|
||||
}
|
||||
|
||||
Maybe<Polygon> geometry;
|
||||
Maybe<gfx::Polygon> geometry;
|
||||
if (aParentGeometry && entry.geometry) {
|
||||
// Both parent and child are split.
|
||||
geometry = Some(aParentGeometry->ClipPolygon(*entry.geometry));
|
||||
@ -243,14 +245,14 @@ FrameBuilder::AddLayerToConstantBuffer(ItemInfo& aItem)
|
||||
// Note we do not use GetEffectiveTransformForBuffer, since we calculate
|
||||
// the correct scaling when we build texture coordinates.
|
||||
Layer* baseLayer = layer->GetLayer();
|
||||
const Matrix4x4& transform = baseLayer->GetEffectiveTransform();
|
||||
const gfx::Matrix4x4& transform = baseLayer->GetEffectiveTransform();
|
||||
|
||||
memcpy(&info->transform, &transform._11, 64);
|
||||
info->clipRect = Rect(layer->GetComputedClipRect().ToUnknownRect());
|
||||
info->clipRect = gfx::Rect(layer->GetComputedClipRect().ToUnknownRect());
|
||||
info->maskIndex = 0;
|
||||
if (MaskOperation* op = layer->GetMask()) {
|
||||
// Note: we use 0 as an invalid index, and so indices are offset by 1.
|
||||
Rect rect = op->ComputeMaskRect(baseLayer);
|
||||
gfx::Rect rect = op->ComputeMaskRect(baseLayer);
|
||||
AddMaskRect(rect, &info->maskIndex);
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ WebRenderDisplayItemLayer::PushItemAsBlobImage(wr::DisplayListBuilder& aBuilder,
|
||||
|
||||
RefPtr<gfx::DrawEventRecorderMemory> recorder = MakeAndAddRef<gfx::DrawEventRecorderMemory>();
|
||||
RefPtr<gfx::DrawTarget> dummyDt =
|
||||
gfx::Factory::CreateDrawTarget(gfx::BackendType::SKIA, IntSize(1, 1), gfx::SurfaceFormat::B8G8R8X8);
|
||||
gfx::Factory::CreateDrawTarget(gfx::BackendType::SKIA, gfx::IntSize(1, 1), gfx::SurfaceFormat::B8G8R8X8);
|
||||
RefPtr<gfx::DrawTarget> dt = gfx::Factory::CreateRecordingDrawTarget(recorder, dummyDt, imageSize.ToUnknownSize());
|
||||
LayerPoint offset = ViewAs<LayerPixel>(
|
||||
LayoutDevicePoint::FromAppUnits(mItem->ToReferenceFrame(), appUnitsPerDevPixel),
|
||||
|
@ -7,20 +7,25 @@
|
||||
#ifndef GFX_TEXTRUN_H
|
||||
#define GFX_TEXTRUN_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gfxTypes.h"
|
||||
#include "nsString.h"
|
||||
#include "gfxPoint.h"
|
||||
#include "gfxFont.h"
|
||||
#include "gfxFontConstants.h"
|
||||
#include "nsTArray.h"
|
||||
#include "gfxSkipChars.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsPoint.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsTextFrameUtils.h"
|
||||
#include "DrawMode.h"
|
||||
#include "harfbuzz/hb.h"
|
||||
#include "nsUnicodeScriptCodes.h"
|
||||
#include "nsColor.h"
|
||||
#include "nsTextFrameUtils.h"
|
||||
#include "X11UndefineNone.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#include <stdio.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user