Bug 1728193 - Remove LayerScope. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D123975
This commit is contained in:
@@ -191,13 +191,9 @@ struct EffectSolidColor : public Effect {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct EffectChain {
|
struct EffectChain {
|
||||||
EffectChain() : mLayerRef(nullptr) {}
|
|
||||||
explicit EffectChain(void* aLayerRef) : mLayerRef(aLayerRef) {}
|
|
||||||
|
|
||||||
RefPtr<Effect> mPrimaryEffect;
|
RefPtr<Effect> mPrimaryEffect;
|
||||||
EnumeratedArray<EffectTypes, EffectTypes::MAX_SECONDARY, RefPtr<Effect>>
|
EnumeratedArray<EffectTypes, EffectTypes::MAX_SECONDARY, RefPtr<Effect>>
|
||||||
mSecondaryEffects;
|
mSecondaryEffects;
|
||||||
void* mLayerRef; //!< For LayerScope logging
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,10 +18,6 @@ namespace layers {
|
|||||||
|
|
||||||
class ImageContainer;
|
class ImageContainer;
|
||||||
|
|
||||||
namespace layerscope {
|
|
||||||
class LayersPacket;
|
|
||||||
} // namespace layerscope
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Layer which renders an Image.
|
* A Layer which renders an Image.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -78,10 +78,6 @@ class GlyphArray;
|
|||||||
class WebRenderLayerManager;
|
class WebRenderLayerManager;
|
||||||
struct AnimData;
|
struct AnimData;
|
||||||
|
|
||||||
namespace layerscope {
|
|
||||||
class LayersPacket;
|
|
||||||
} // namespace layerscope
|
|
||||||
|
|
||||||
// Defined in LayerUserData.h; please include that file instead.
|
// Defined in LayerUserData.h; please include that file instead.
|
||||||
class LayerUserData;
|
class LayerUserData;
|
||||||
|
|
||||||
@@ -469,12 +465,6 @@ class LayerManager : public WindowRenderer {
|
|||||||
bool aSorted = false);
|
bool aSorted = false);
|
||||||
void Dump(bool aSorted = false);
|
void Dump(bool aSorted = false);
|
||||||
|
|
||||||
/**
|
|
||||||
* Dump information about this layer manager and its managed tree to
|
|
||||||
* layerscope packet.
|
|
||||||
*/
|
|
||||||
void Dump(layerscope::LayersPacket* aPacket);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log information about this layer manager and its managed tree to
|
* Log information about this layer manager and its managed tree to
|
||||||
* the NSPR log (if enabled for "Layers").
|
* the NSPR log (if enabled for "Layers").
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,66 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* vim:set ts=4 sw=2 sts=2 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 GFX_LAYERSCOPE_H
|
|
||||||
#define GFX_LAYERSCOPE_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <mozilla/UniquePtr.h>
|
|
||||||
#include "gfxMatrix.h"
|
|
||||||
#include "mozilla/gfx/Rect.h"
|
|
||||||
|
|
||||||
namespace mozilla {
|
|
||||||
|
|
||||||
namespace gl {
|
|
||||||
class GLContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace layers {
|
|
||||||
|
|
||||||
namespace layerscope {
|
|
||||||
class Packet;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct EffectChain;
|
|
||||||
class LayerComposite;
|
|
||||||
class TextureHost;
|
|
||||||
|
|
||||||
class LayerScope {
|
|
||||||
public:
|
|
||||||
static void DrawBegin();
|
|
||||||
static void SetRenderOffset(float aX, float aY);
|
|
||||||
static void SetLayerTransform(const gfx::Matrix4x4& aMatrix);
|
|
||||||
static void SetDrawRects(size_t aRects, const gfx::Rect* aLayerRects,
|
|
||||||
const gfx::Rect* aTextureRects);
|
|
||||||
static void DrawEnd(gl::GLContext* aGLContext,
|
|
||||||
const EffectChain& aEffectChain, int aWidth, int aHeight);
|
|
||||||
|
|
||||||
static bool CheckSendable();
|
|
||||||
static void CleanLayer();
|
|
||||||
static void SetHWComposed();
|
|
||||||
|
|
||||||
static void SetPixelScale(double devPixelsPerCSSPixel);
|
|
||||||
static void ContentChanged(TextureHost* host);
|
|
||||||
|
|
||||||
private:
|
|
||||||
static void Init();
|
|
||||||
};
|
|
||||||
|
|
||||||
// Perform BeginFrame and EndFrame automatically
|
|
||||||
class LayerScopeAutoFrame final {
|
|
||||||
public:
|
|
||||||
explicit LayerScopeAutoFrame(int64_t aFrameStamp);
|
|
||||||
~LayerScopeAutoFrame();
|
|
||||||
|
|
||||||
private:
|
|
||||||
static void BeginFrame(int64_t aFrameStamp);
|
|
||||||
static void EndFrame();
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace layers
|
|
||||||
} // namespace mozilla
|
|
||||||
|
|
||||||
#endif /* GFX_LAYERSCOPE_H */
|
|
||||||
@@ -50,7 +50,6 @@
|
|||||||
#include "nsPrintfCString.h" // for nsPrintfCString
|
#include "nsPrintfCString.h" // for nsPrintfCString
|
||||||
#include "nsRegionFwd.h" // for IntRegion
|
#include "nsRegionFwd.h" // for IntRegion
|
||||||
#include "nsString.h" // for nsTSubstring
|
#include "nsString.h" // for nsTSubstring
|
||||||
#include "protobuf/LayerScopePacket.pb.h" // for LayersPacket::Layer, LayersPacket, LayersPacket_Layer::Matrix, LayersPacke...
|
|
||||||
|
|
||||||
// Undo the damage done by mozzconf.h
|
// Undo the damage done by mozzconf.h
|
||||||
#undef compress
|
#undef compress
|
||||||
|
|||||||
@@ -77,10 +77,6 @@ class Compositor;
|
|||||||
class TransformData;
|
class TransformData;
|
||||||
struct PropertyAnimationGroup;
|
struct PropertyAnimationGroup;
|
||||||
|
|
||||||
namespace layerscope {
|
|
||||||
class LayersPacket;
|
|
||||||
} // namespace layerscope
|
|
||||||
|
|
||||||
#define MOZ_LAYER_DECL_NAME(n, e) \
|
#define MOZ_LAYER_DECL_NAME(n, e) \
|
||||||
const char* Name() const override { return n; } \
|
const char* Name() const override { return n; } \
|
||||||
LayerType GetType() const override { return e; } \
|
LayerType GetType() const override { return e; } \
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ namespace layers {
|
|||||||
|
|
||||||
class ReadbackProcessor;
|
class ReadbackProcessor;
|
||||||
|
|
||||||
namespace layerscope {
|
|
||||||
class LayersPacket;
|
|
||||||
} // namespace layerscope
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A ReadbackSink receives a stream of updates to a rectangle of pixels.
|
* A ReadbackSink receives a stream of updates to a rectangle of pixels.
|
||||||
* These update callbacks are always called on the main thread, either during
|
* These update callbacks are always called on the main thread, either during
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#include "TextureHost.h"
|
#include "TextureHost.h"
|
||||||
|
|
||||||
#include "CompositableHost.h" // for CompositableHost
|
#include "CompositableHost.h" // for CompositableHost
|
||||||
#include "LayerScope.h"
|
|
||||||
#include "mozilla/gfx/2D.h" // for DataSourceSurface, Factory
|
#include "mozilla/gfx/2D.h" // for DataSourceSurface, Factory
|
||||||
#include "mozilla/gfx/gfxVars.h"
|
#include "mozilla/gfx/gfxVars.h"
|
||||||
#include "mozilla/ipc/Shmem.h" // for Shmem
|
#include "mozilla/ipc/Shmem.h" // for Shmem
|
||||||
@@ -525,7 +524,6 @@ void TextureHost::PrintInfo(std::stringstream& aStream, const char* aPrefix) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TextureHost::Updated(const nsIntRegion* aRegion) {
|
void TextureHost::Updated(const nsIntRegion* aRegion) {
|
||||||
LayerScope::ContentChanged(this);
|
|
||||||
UpdatedInternal(aRegion);
|
UpdatedInternal(aRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,8 +95,6 @@
|
|||||||
# include "mozilla/gfx/DeviceManagerDx.h"
|
# include "mozilla/gfx/DeviceManagerDx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "LayerScope.h"
|
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
namespace layers {
|
namespace layers {
|
||||||
@@ -394,8 +392,6 @@ void CompositorBridgeParent::Initialize() {
|
|||||||
MonitorAutoLock lock(*sIndirectLayerTreesLock);
|
MonitorAutoLock lock(*sIndirectLayerTreesLock);
|
||||||
sIndirectLayerTrees[mRootLayerTreeID].mParent = this;
|
sIndirectLayerTrees[mRootLayerTreeID].mParent = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerScope::SetPixelScale(mScale.scale);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LayersId CompositorBridgeParent::RootLayerTreeId() {
|
LayersId CompositorBridgeParent::RootLayerTreeId() {
|
||||||
|
|||||||
@@ -22,12 +22,10 @@ EXPORTS += [
|
|||||||
"ImageTypes.h",
|
"ImageTypes.h",
|
||||||
"IMFYCbCrImage.h",
|
"IMFYCbCrImage.h",
|
||||||
"Layers.h",
|
"Layers.h",
|
||||||
"LayerScope.h",
|
|
||||||
"LayersTypes.h",
|
"LayersTypes.h",
|
||||||
"LayerUserData.h",
|
"LayerUserData.h",
|
||||||
"opengl/OGLShaderConfig.h",
|
"opengl/OGLShaderConfig.h",
|
||||||
"opengl/OGLShaderProgram.h",
|
"opengl/OGLShaderProgram.h",
|
||||||
"protobuf/LayerScopePacket.pb.h",
|
|
||||||
"ReadbackLayer.h",
|
"ReadbackLayer.h",
|
||||||
"TiledLayerBuffer.h",
|
"TiledLayerBuffer.h",
|
||||||
]
|
]
|
||||||
@@ -420,7 +418,6 @@ UNIFIED_SOURCES += [
|
|||||||
"ipc/VideoBridgeParent.cpp",
|
"ipc/VideoBridgeParent.cpp",
|
||||||
"LayerManager.cpp",
|
"LayerManager.cpp",
|
||||||
"Layers.cpp",
|
"Layers.cpp",
|
||||||
"LayerScope.cpp",
|
|
||||||
"LayersHelpers.cpp",
|
"LayersHelpers.cpp",
|
||||||
"LayersTypes.cpp",
|
"LayersTypes.cpp",
|
||||||
"MemoryPressureObserver.cpp",
|
"MemoryPressureObserver.cpp",
|
||||||
@@ -470,7 +467,6 @@ SOURCES += [
|
|||||||
"client/TextureClient.cpp",
|
"client/TextureClient.cpp",
|
||||||
"ImageContainer.cpp",
|
"ImageContainer.cpp",
|
||||||
"PersistentBufferProvider.cpp",
|
"PersistentBufferProvider.cpp",
|
||||||
"protobuf/LayerScopePacket.pb.cc",
|
|
||||||
"wr/WebRenderTextureHost.cpp",
|
"wr/WebRenderTextureHost.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
#include "GLContext.h" // for GLContext
|
#include "GLContext.h" // for GLContext
|
||||||
#include "GLUploadHelpers.h"
|
#include "GLUploadHelpers.h"
|
||||||
#include "Layers.h" // for WriteSnapshotToDumpFile
|
#include "Layers.h" // for WriteSnapshotToDumpFile
|
||||||
#include "LayerScope.h" // for LayerScope
|
|
||||||
#include "gfxCrashReporterUtils.h" // for ScopedGfxFeatureReporter
|
#include "gfxCrashReporterUtils.h" // for ScopedGfxFeatureReporter
|
||||||
#include "gfxEnv.h" // for gfxEnv
|
#include "gfxEnv.h" // for gfxEnv
|
||||||
#include "gfxPlatform.h" // for gfxPlatform
|
#include "gfxPlatform.h" // for gfxPlatform
|
||||||
@@ -1450,8 +1449,6 @@ void CompositorOGL::DrawGeometry(const Geometry& aGeometry,
|
|||||||
// quads. Fix me.
|
// quads. Fix me.
|
||||||
mPixelsFilled += destRect.Area();
|
mPixelsFilled += destRect.Area();
|
||||||
|
|
||||||
LayerScope::DrawBegin();
|
|
||||||
|
|
||||||
EffectMask* effectMask;
|
EffectMask* effectMask;
|
||||||
Rect maskBounds;
|
Rect maskBounds;
|
||||||
if (aEffectChain.mSecondaryEffects[EffectTypes::MASK]) {
|
if (aEffectChain.mSecondaryEffects[EffectTypes::MASK]) {
|
||||||
@@ -1551,7 +1548,6 @@ void CompositorOGL::DrawGeometry(const Geometry& aGeometry,
|
|||||||
}
|
}
|
||||||
program->SetProjectionMatrix(mProjMatrix);
|
program->SetProjectionMatrix(mProjMatrix);
|
||||||
program->SetLayerTransform(aTransform);
|
program->SetLayerTransform(aTransform);
|
||||||
LayerScope::SetLayerTransform(aTransform);
|
|
||||||
|
|
||||||
if (colorMatrix) {
|
if (colorMatrix) {
|
||||||
EffectColorMatrix* effectColorMatrix = static_cast<EffectColorMatrix*>(
|
EffectColorMatrix* effectColorMatrix = static_cast<EffectColorMatrix*>(
|
||||||
@@ -1580,7 +1576,6 @@ void CompositorOGL::DrawGeometry(const Geometry& aGeometry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
program->SetRenderOffset(offset.x, offset.y);
|
program->SetRenderOffset(offset.x, offset.y);
|
||||||
LayerScope::SetRenderOffset(offset.x, offset.y);
|
|
||||||
|
|
||||||
if (aOpacity != 1.f) program->SetLayerOpacity(aOpacity);
|
if (aOpacity != 1.f) program->SetLayerOpacity(aOpacity);
|
||||||
|
|
||||||
@@ -1914,8 +1909,6 @@ void CompositorOGL::DrawGeometry(const Geometry& aGeometry,
|
|||||||
|
|
||||||
// in case rendering has used some other GL context
|
// in case rendering has used some other GL context
|
||||||
MakeCurrent();
|
MakeCurrent();
|
||||||
|
|
||||||
LayerScope::DrawEnd(mGLContext, aEffectChain, aRect.Width(), aRect.Height());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompositorOGL::BindAndDrawGeometry(ShaderProgramOGL* aProgram,
|
void CompositorOGL::BindAndDrawGeometry(ShaderProgramOGL* aProgram,
|
||||||
@@ -1991,7 +1984,6 @@ void CompositorOGL::BindAndDrawQuads(ShaderProgramOGL* aProg, int aQuads,
|
|||||||
mGLContext->fDrawArrays(LOCAL_GL_TRIANGLES, 0, 6 * aQuads);
|
mGLContext->fDrawArrays(LOCAL_GL_TRIANGLES, 0, 6 * aQuads);
|
||||||
mGLContext->fDisableVertexAttribArray(kCoordinateAttributeIndex);
|
mGLContext->fDisableVertexAttribArray(kCoordinateAttributeIndex);
|
||||||
mGLContext->fBindBuffer(LOCAL_GL_ARRAY_BUFFER, 0);
|
mGLContext->fBindBuffer(LOCAL_GL_ARRAY_BUFFER, 0);
|
||||||
LayerScope::SetDrawRects(aQuads, aLayerRects, aTextureRects);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompositorOGL::InitializeVAO(const GLuint aAttrib, const GLint aComponents,
|
void CompositorOGL::InitializeVAO(const GLuint aAttrib, const GLint aComponents,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,221 +0,0 @@
|
|||||||
/* vim:set ts=2 sw=2 sts=2 et: */
|
|
||||||
|
|
||||||
syntax = "proto2";
|
|
||||||
|
|
||||||
option optimize_for = LITE_RUNTIME;
|
|
||||||
|
|
||||||
package mozilla.layers.layerscope;
|
|
||||||
|
|
||||||
// ===============================
|
|
||||||
// Server to Client messages
|
|
||||||
// ===============================
|
|
||||||
message FramePacket {
|
|
||||||
optional uint64 value = 1;
|
|
||||||
optional float scale = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ColorPacket {
|
|
||||||
required uint64 layerref = 1;
|
|
||||||
optional uint32 width = 2;
|
|
||||||
optional uint32 height = 3;
|
|
||||||
optional uint32 color = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
message TexturePacket {
|
|
||||||
enum Filter {
|
|
||||||
GOOD = 0;
|
|
||||||
LINEAR = 1;
|
|
||||||
POINT = 2;
|
|
||||||
}
|
|
||||||
message Rect {
|
|
||||||
optional float x = 1;
|
|
||||||
optional float y = 2;
|
|
||||||
optional float w = 3;
|
|
||||||
optional float h = 4;
|
|
||||||
}
|
|
||||||
message Size {
|
|
||||||
optional int32 w = 1;
|
|
||||||
optional int32 h = 2;
|
|
||||||
}
|
|
||||||
message Matrix {
|
|
||||||
optional bool is2D = 1;
|
|
||||||
optional bool isId = 2;
|
|
||||||
repeated float m = 3;
|
|
||||||
}
|
|
||||||
message EffectMask {
|
|
||||||
optional bool mIs3D = 1;
|
|
||||||
optional Size mSize = 2;
|
|
||||||
optional Matrix mMaskTransform = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Basic info
|
|
||||||
required uint64 layerref = 1;
|
|
||||||
optional uint32 width = 2;
|
|
||||||
optional uint32 height = 3;
|
|
||||||
optional uint32 stride = 4;
|
|
||||||
optional uint32 name = 5;
|
|
||||||
optional uint32 target = 6;
|
|
||||||
optional uint32 dataformat = 7;
|
|
||||||
optional uint64 glcontext = 8;
|
|
||||||
optional bytes data = 9;
|
|
||||||
|
|
||||||
// TextureEffect attributes
|
|
||||||
optional Rect mTextureCoords = 10;
|
|
||||||
optional bool mPremultiplied = 11;
|
|
||||||
optional Filter mFilter = 12;
|
|
||||||
|
|
||||||
// Mask attributes
|
|
||||||
optional bool isMask = 20;
|
|
||||||
optional EffectMask mask = 21;
|
|
||||||
}
|
|
||||||
|
|
||||||
message LayersPacket {
|
|
||||||
message Layer {
|
|
||||||
enum LayerType {
|
|
||||||
UnknownLayer = 0;
|
|
||||||
LayerManager = 1;
|
|
||||||
ContainerLayer = 2;
|
|
||||||
PaintedLayer = 3;
|
|
||||||
CanvasLayer = 4;
|
|
||||||
ImageLayer = 5;
|
|
||||||
ColorLayer = 6;
|
|
||||||
RefLayer = 8;
|
|
||||||
ReadbackLayer = 9;
|
|
||||||
DisplayItemLayer = 10;
|
|
||||||
}
|
|
||||||
enum ScrollingDirect {
|
|
||||||
VERTICAL = 1;
|
|
||||||
HORIZONTAL = 2;
|
|
||||||
}
|
|
||||||
enum Filter {
|
|
||||||
FILTER_FAST = 0; // deprecated
|
|
||||||
FILTER_GOOD = 1;
|
|
||||||
FILTER_BEST = 2; // deprecated
|
|
||||||
FILTER_NEAREST = 3; //deprecated
|
|
||||||
FILTER_BILINEAR = 4; //deprecated
|
|
||||||
FILTER_GAUSSIAN = 5; //deprecated
|
|
||||||
FILTER_SENTINEL = 6; //deprecated
|
|
||||||
FILTER_LINEAR = 7;
|
|
||||||
FILTER_POINT = 8;
|
|
||||||
}
|
|
||||||
message Size {
|
|
||||||
optional int32 w = 1;
|
|
||||||
optional int32 h = 2;
|
|
||||||
}
|
|
||||||
message Rect {
|
|
||||||
optional int32 x = 1;
|
|
||||||
optional int32 y = 2;
|
|
||||||
optional int32 w = 3;
|
|
||||||
optional int32 h = 4;
|
|
||||||
}
|
|
||||||
message Region {
|
|
||||||
repeated Rect r = 1;
|
|
||||||
}
|
|
||||||
message Matrix {
|
|
||||||
optional bool is2D = 1;
|
|
||||||
optional bool isId = 2;
|
|
||||||
repeated float m = 3;
|
|
||||||
}
|
|
||||||
message Shadow {
|
|
||||||
optional Rect clip = 1;
|
|
||||||
optional Matrix transform = 2;
|
|
||||||
optional Region vRegion = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Basic info
|
|
||||||
// Note: Parent's pointer is used to recontruct the layer tree
|
|
||||||
required LayerType type = 1;
|
|
||||||
required uint64 ptr = 2;
|
|
||||||
required uint64 parentPtr = 3;
|
|
||||||
|
|
||||||
// Common info (10 to 99)
|
|
||||||
optional Rect clip = 10;
|
|
||||||
optional Matrix transform = 11;
|
|
||||||
optional Region vRegion = 12; // visible region
|
|
||||||
optional Shadow shadow = 13; // shadow info
|
|
||||||
optional float opacity = 14;
|
|
||||||
optional bool cOpaque = 15; // content opaque
|
|
||||||
optional bool cAlpha = 16; // component alpha
|
|
||||||
optional ScrollingDirect direct = 17;
|
|
||||||
optional uint64 barID = 18;
|
|
||||||
optional uint64 mask = 19; // mask layer
|
|
||||||
optional Region hitRegion = 20;
|
|
||||||
optional Region dispatchRegion = 21;
|
|
||||||
optional Region noActionRegion = 22;
|
|
||||||
optional Region hPanRegion = 23;
|
|
||||||
optional Region vPanRegion = 24;
|
|
||||||
|
|
||||||
// Specific info (100 to max)
|
|
||||||
// Painted Layer
|
|
||||||
optional Region valid = 100;
|
|
||||||
// Color Layer
|
|
||||||
optional uint32 color = 101;
|
|
||||||
// Canvas & Image Layer
|
|
||||||
optional Filter filter = 102;
|
|
||||||
// Ref Layer
|
|
||||||
optional uint64 refID = 103;
|
|
||||||
// Readback Layer
|
|
||||||
optional Size size = 104;
|
|
||||||
optional uint32 displayListLogLength = 105;
|
|
||||||
optional bytes displayListLog = 106;
|
|
||||||
}
|
|
||||||
repeated Layer layer = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message MetaPacket {
|
|
||||||
optional bool composedByHwc = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message DrawPacket {
|
|
||||||
message Rect {
|
|
||||||
required float x = 1;
|
|
||||||
required float y = 2;
|
|
||||||
required float w = 3;
|
|
||||||
required float h = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
required float offsetX = 1;
|
|
||||||
required float offsetY = 2;
|
|
||||||
repeated float mvMatrix = 3;
|
|
||||||
required uint32 totalRects = 4;
|
|
||||||
repeated Rect layerRect = 5;
|
|
||||||
required uint64 layerref = 6;
|
|
||||||
repeated uint32 texIDs = 7;
|
|
||||||
repeated Rect textureRect = 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We only need to use this Packet.
|
|
||||||
// Other packet definitions are just type defines
|
|
||||||
message Packet {
|
|
||||||
enum DataType {
|
|
||||||
FRAMESTART = 1;
|
|
||||||
FRAMEEND = 2;
|
|
||||||
COLOR = 3;
|
|
||||||
TEXTURE = 4;
|
|
||||||
LAYERS = 5;
|
|
||||||
META = 6;
|
|
||||||
DRAW = 7;
|
|
||||||
}
|
|
||||||
required DataType type = 1;
|
|
||||||
|
|
||||||
optional FramePacket frame = 2;
|
|
||||||
optional ColorPacket color = 3;
|
|
||||||
optional TexturePacket texture = 4;
|
|
||||||
optional LayersPacket layers = 5;
|
|
||||||
optional MetaPacket meta = 6;
|
|
||||||
optional DrawPacket draw = 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ===============================
|
|
||||||
// Client to Server messages
|
|
||||||
// ===============================
|
|
||||||
message CommandPacket {
|
|
||||||
enum CmdType {
|
|
||||||
NO_OP = 0;
|
|
||||||
LAYERS_TREE = 1;
|
|
||||||
LAYERS_BUFFER = 2;
|
|
||||||
}
|
|
||||||
required CmdType type = 1;
|
|
||||||
optional bool value = 2;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user