提交 dda79d03 编写于 作者: A Adam Barth

Fix style in //flow/instrumentation (#2608)

This patch makes these files better match Google C++ style.

Also, add the engine lap time when running on Mojo.
上级 ff021d7b
...@@ -9,56 +9,54 @@ ...@@ -9,56 +9,54 @@
#include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkPath.h"
namespace flow { namespace flow {
namespace instrumentation {
static const size_t kMaxSamples = 120; static const size_t kMaxSamples = 120;
static const size_t kMaxFrameMarkers = 8; static const size_t kMaxFrameMarkers = 8;
Stopwatch::Stopwatch() : _start(base::TimeTicks::Now()), _current_sample(0) { Stopwatch::Stopwatch() : start_(base::TimeTicks::Now()), current_sample_(0) {
const base::TimeDelta delta; const base::TimeDelta delta;
_laps.resize(kMaxSamples, delta); laps_.resize(kMaxSamples, delta);
} }
void Stopwatch::start() { void Stopwatch::Start() {
_start = base::TimeTicks::Now(); start_ = base::TimeTicks::Now();
_current_sample = (_current_sample + 1) % kMaxSamples; current_sample_ = (current_sample_ + 1) % kMaxSamples;
} }
void Stopwatch::stop() { void Stopwatch::Stop() {
_laps[_current_sample] = base::TimeTicks::Now() - _start; laps_[current_sample_] = base::TimeTicks::Now() - start_;
} }
void Stopwatch::setLapTime(const base::TimeDelta& delta) { void Stopwatch::SetLapTime(const base::TimeDelta& delta) {
_current_sample = (_current_sample + 1) % kMaxSamples; current_sample_ = (current_sample_ + 1) % kMaxSamples;
_laps[_current_sample] = delta; laps_[current_sample_] = delta;
} }
const base::TimeDelta& Stopwatch::lastLap() const { const base::TimeDelta& Stopwatch::LastLap() const {
return _laps[(_current_sample - 1) % kMaxSamples]; return laps_[(current_sample_ - 1) % kMaxSamples];
} }
static inline constexpr double UnitFrameInterval(double frameTimeMS) { static inline constexpr double UnitFrameInterval(double frame_time_ms) {
return frameTimeMS * 60.0 * 1e-3; return frame_time_ms * 60.0 * 1e-3;
} }
static inline double UnitHeight(double frameTimeMS, double maxUnitInterval) { static inline double UnitHeight(double frame_time_ms, double max_unit_interval) {
double unitHeight = UnitFrameInterval(frameTimeMS) / maxUnitInterval; double unitHeight = UnitFrameInterval(frame_time_ms) / max_unit_interval;
if (unitHeight > 1.0) if (unitHeight > 1.0)
unitHeight = 1.0; unitHeight = 1.0;
return unitHeight; return unitHeight;
} }
base::TimeDelta Stopwatch::maxDelta() const { base::TimeDelta Stopwatch::MaxDelta() const {
base::TimeDelta maxDelta; base::TimeDelta max_delta;
for (size_t i = 0; i < kMaxSamples; i++) { for (size_t i = 0; i < kMaxSamples; i++) {
if (_laps[i] > maxDelta) { if (laps_[i] > max_delta)
maxDelta = _laps[i]; max_delta = laps_[i];
}
} }
return maxDelta; return max_delta;
} }
void Stopwatch::visualize(SkCanvas& canvas, const SkRect& rect) const { void Stopwatch::Visualize(SkCanvas& canvas, const SkRect& rect) const {
SkPaint paint; SkPaint paint;
// Paint the background. // Paint the background.
...@@ -74,30 +72,30 @@ void Stopwatch::visualize(SkCanvas& canvas, const SkRect& rect) const { ...@@ -74,30 +72,30 @@ void Stopwatch::visualize(SkCanvas& canvas, const SkRect& rect) const {
const SkScalar right = x + width; const SkScalar right = x + width;
// Scale the graph to show frame times up to those that are 4 times the frame time. // Scale the graph to show frame times up to those that are 4 times the frame time.
const double maxInterval = kOneFrameMS * 3.0; const double max_interval = kOneFrameMS * 3.0;
const double maxUnitInterval = UnitFrameInterval(maxInterval); const double max_unit_interval = UnitFrameInterval(max_interval);
// Prepare a path for the data. // Prepare a path for the data.
// we start at the height of the last point, so it looks like we wrap around // we start at the height of the last point, so it looks like we wrap around
SkPath path; SkPath path;
const double sampleUnitWidth = (1.0 / kMaxSamples); const double sample_unit_width = (1.0 / kMaxSamples);
const double sampleMarginUnitWidth = sampleUnitWidth / 6.0; const double sample_margin_unit_width = sample_unit_width / 6.0;
const double sampleMarginWidth = width * sampleMarginUnitWidth; const double sample_margin_width = width * sample_margin_unit_width;
path.moveTo(x, bottom); path.moveTo(x, bottom);
path.lineTo(x, y + height * (1.0 - UnitHeight(_laps[0].InMillisecondsF(), path.lineTo(x, y + height * (1.0 - UnitHeight(laps_[0].InMillisecondsF(),
maxUnitInterval))); max_unit_interval)));
double unitX; double unit_x;
double unitNextX = 0.0; double unit_next_x = 0.0;
for (size_t i = 0; i < kMaxSamples; i += 1) { for (size_t i = 0; i < kMaxSamples; i += 1) {
unitX = unitNextX; unit_x = unit_next_x;
unitNextX = (static_cast<double>(i + 1) / kMaxSamples); unit_next_x = (static_cast<double>(i + 1) / kMaxSamples);
const double sampleY = y + height * (1.0 - UnitHeight(_laps[i].InMillisecondsF(), const double sample_y = y + height * (1.0 - UnitHeight(laps_[i].InMillisecondsF(),
maxUnitInterval)); max_unit_interval));
path.lineTo(x + width * unitX + sampleMarginWidth, sampleY); path.lineTo(x + width * unit_x + sample_margin_width, sample_y);
path.lineTo(x + width * unitNextX - sampleMarginWidth, sampleY); path.lineTo(x + width * unit_next_x - sample_margin_width, sample_y);
} }
path.lineTo(right, y + height * (1.0 - UnitHeight(_laps[kMaxSamples - 1].InMillisecondsF(), path.lineTo(right, y + height * (1.0 - UnitHeight(laps_[kMaxSamples - 1].InMillisecondsF(),
maxUnitInterval))); max_unit_interval)));
path.lineTo(right, bottom); path.lineTo(right, bottom);
path.close(); path.close();
...@@ -110,21 +108,20 @@ void Stopwatch::visualize(SkCanvas& canvas, const SkRect& rect) const { ...@@ -110,21 +108,20 @@ void Stopwatch::visualize(SkCanvas& canvas, const SkRect& rect) const {
paint.setStyle(SkPaint::Style::kStroke_Style); paint.setStyle(SkPaint::Style::kStroke_Style);
paint.setColor(0xCC000000); paint.setColor(0xCC000000);
if (maxInterval > kOneFrameMS) { if (max_interval > kOneFrameMS) {
// Paint the horizontal markers // Paint the horizontal markers
size_t frameMarkerCount = static_cast<size_t>(maxInterval / kOneFrameMS); size_t frame_marker_count = static_cast<size_t>(max_interval / kOneFrameMS);
// Limit the number of markers displayed. After a certain point, the graph // Limit the number of markers displayed. After a certain point, the graph
// becomes crowded // becomes crowded
if (frameMarkerCount > kMaxFrameMarkers) { if (frame_marker_count > kMaxFrameMarkers)
frameMarkerCount = 1; frame_marker_count = 1;
}
for (size_t frame_index = 0; frame_index < frame_marker_count; frame_index++) {
for (size_t frameIndex = 0; frameIndex < frameMarkerCount; frameIndex++) { const double frame_height =
const double frameHeight = height * (1.0 - (UnitFrameInterval((frame_index + 1) * kOneFrameMS) /
height * (1.0 - (UnitFrameInterval((frameIndex + 1) * kOneFrameMS) / max_unit_interval));
maxUnitInterval)); canvas.drawLine(x, y + frame_height, right, y + frame_height, paint);
canvas.drawLine(x, y + frameHeight, right, y + frameHeight, paint);
} }
} }
...@@ -132,19 +129,18 @@ void Stopwatch::visualize(SkCanvas& canvas, const SkRect& rect) const { ...@@ -132,19 +129,18 @@ void Stopwatch::visualize(SkCanvas& canvas, const SkRect& rect) const {
// We paint it over the current frame, not after it, because when we // We paint it over the current frame, not after it, because when we
// paint this we don't yet have all the times for the current frame. // paint this we don't yet have all the times for the current frame.
paint.setStyle(SkPaint::Style::kFill_Style); paint.setStyle(SkPaint::Style::kFill_Style);
if (UnitFrameInterval(lastLap().InMillisecondsF()) > 1.0) { if (UnitFrameInterval(LastLap().InMillisecondsF()) > 1.0) {
// budget exceeded // budget exceeded
paint.setColor(SK_ColorRED); paint.setColor(SK_ColorRED);
} else { } else {
// within budget // within budget
paint.setColor(SK_ColorGREEN); paint.setColor(SK_ColorGREEN);
} }
double sampleX = x + width * (static_cast<double>(_current_sample) / kMaxSamples) double sample_x = x + width * (static_cast<double>(current_sample_) / kMaxSamples)
- sampleMarginWidth; - sample_margin_width;
canvas.drawRectCoords(sampleX, y, sampleX + width * sampleUnitWidth + sampleMarginWidth * 2, bottom, paint); canvas.drawRectCoords(sample_x, y, sample_x + width * sample_unit_width + sample_margin_width * 2, bottom, paint);
} }
Stopwatch::~Stopwatch() = default; Stopwatch::~Stopwatch() = default;
} // namespace instrumentation
} // namespace flow } // namespace flow
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkCanvas.h"
namespace flow { namespace flow {
namespace instrumentation {
static const double kOneFrameMS = 1e3 / 60.0; static const double kOneFrameMS = 1e3 / 60.0;
...@@ -19,14 +18,14 @@ class Stopwatch { ...@@ -19,14 +18,14 @@ class Stopwatch {
public: public:
class ScopedLap { class ScopedLap {
public: public:
explicit ScopedLap(Stopwatch& stopwatch) : _stopwatch(stopwatch) { explicit ScopedLap(Stopwatch& stopwatch) : stopwatch_(stopwatch) {
_stopwatch.start(); stopwatch_.Start();
} }
~ScopedLap() { _stopwatch.stop(); } ~ScopedLap() { stopwatch_.Stop(); }
private: private:
Stopwatch& _stopwatch; Stopwatch& stopwatch_;
DISALLOW_COPY_AND_ASSIGN(ScopedLap); DISALLOW_COPY_AND_ASSIGN(ScopedLap);
}; };
...@@ -34,45 +33,36 @@ class Stopwatch { ...@@ -34,45 +33,36 @@ class Stopwatch {
explicit Stopwatch(); explicit Stopwatch();
~Stopwatch(); ~Stopwatch();
const base::TimeDelta& lastLap() const; const base::TimeDelta& LastLap() const;
base::TimeDelta CurrentLap() const { return base::TimeTicks::Now() - start_; }
base::TimeDelta currentLap() const { return base::TimeTicks::Now() - _start; } base::TimeDelta MaxDelta() const;
void Visualize(SkCanvas& canvas, const SkRect& rect) const;
base::TimeDelta maxDelta() const; void Start();
void Stop();
void visualize(SkCanvas& canvas, const SkRect& rect) const; void SetLapTime(const base::TimeDelta& delta);
void start();
void stop();
void setLapTime(const base::TimeDelta& delta);
private: private:
base::TimeTicks _start; base::TimeTicks start_;
std::vector<base::TimeDelta> _laps; std::vector<base::TimeDelta> laps_;
size_t _current_sample; size_t current_sample_;
DISALLOW_COPY_AND_ASSIGN(Stopwatch); DISALLOW_COPY_AND_ASSIGN(Stopwatch);
}; };
class Counter { class Counter {
public: public:
explicit Counter() : _count(0) {} explicit Counter() : count_(0) {}
size_t count() const { return _count; }
void reset(size_t count = 0) { _count = count; }
void increment(size_t count = 1) { _count += count; } size_t count() const { return count_; }
void Reset(size_t count = 0) { count_ = count; }
void Increment(size_t count = 1) { count_ += count; }
private: private:
size_t _count; size_t count_;
DISALLOW_COPY_AND_ASSIGN(Counter); DISALLOW_COPY_AND_ASSIGN(Counter);
}; };
} // namespace instrumentation
} // namespace flow } // namespace flow
#endif // FLOW_INSTRUMENTATION_H_ #endif // FLOW_INSTRUMENTATION_H_
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/macros.h" #include "base/macros.h"
#include "flow/paint_context.h" #include "flow/paint_context.h"
#include "mojo/services/gfx/composition/interfaces/scenes.mojom.h"
#include "skia/ext/refptr.h" #include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkColor.h"
...@@ -23,6 +22,15 @@ ...@@ -23,6 +22,15 @@
#include "third_party/skia/include/core/SkRRect.h" #include "third_party/skia/include/core/SkRRect.h"
#include "third_party/skia/include/core/SkXfermode.h" #include "third_party/skia/include/core/SkXfermode.h"
namespace mojo {
namespace gfx {
namespace composition {
class SceneUpdate;
class Node;
} // composition
} // namespace gfx
} // namespace mojo
namespace flow { namespace flow {
class ContainerLayer; class ContainerLayer;
...@@ -32,13 +40,13 @@ class Layer { ...@@ -32,13 +40,13 @@ class Layer {
virtual ~Layer(); virtual ~Layer();
struct PrerollContext { struct PrerollContext {
PaintContext::ScopedFrame& frame; RasterCache& raster_cache;
GrContext* gr_context;
SkRect child_paint_bounds; SkRect child_paint_bounds;
}; };
virtual void Preroll(PrerollContext* context, const SkMatrix& matrix); virtual void Preroll(PrerollContext* context, const SkMatrix& matrix);
virtual void Paint(PaintContext::ScopedFrame& frame) = 0; virtual void Paint(PaintContext::ScopedFrame& frame) = 0;
virtual void UpdateScene(mojo::gfx::composition::SceneUpdate* update, virtual void UpdateScene(mojo::gfx::composition::SceneUpdate* update,
mojo::gfx::composition::Node* container); mojo::gfx::composition::Node* container);
......
...@@ -18,7 +18,11 @@ LayerTree::~LayerTree() { ...@@ -18,7 +18,11 @@ LayerTree::~LayerTree() {
void LayerTree::Raster(PaintContext::ScopedFrame& frame) { void LayerTree::Raster(PaintContext::ScopedFrame& frame) {
{ {
TRACE_EVENT0("flutter", "LayerTree::Preroll"); TRACE_EVENT0("flutter", "LayerTree::Preroll");
Layer::PrerollContext context = { frame, SkRect::MakeEmpty() }; Layer::PrerollContext context = {
frame.context().raster_cache(),
frame.gr_context(),
SkRect::MakeEmpty(),
};
root_layer_->Preroll(&context, SkMatrix()); root_layer_->Preroll(&context, SkMatrix());
} }
......
...@@ -23,7 +23,7 @@ void DrawStatisticsText(SkCanvas& canvas, ...@@ -23,7 +23,7 @@ void DrawStatisticsText(SkCanvas& canvas,
} }
void VisualizeStopWatch(SkCanvas& canvas, void VisualizeStopWatch(SkCanvas& canvas,
const instrumentation::Stopwatch& stopwatch, const Stopwatch& stopwatch,
SkScalar x, SkScalar x,
SkScalar y, SkScalar y,
SkScalar width, SkScalar width,
...@@ -31,36 +31,36 @@ void VisualizeStopWatch(SkCanvas& canvas, ...@@ -31,36 +31,36 @@ void VisualizeStopWatch(SkCanvas& canvas,
bool show_graph, bool show_graph,
bool show_labels, bool show_labels,
const std::string& label_prefix) { const std::string& label_prefix) {
const int labelX = 8; // distance from x const int label_x = 8; // distance from x
const int labelY = -10; // distance from y+height const int label_y = -10; // distance from y+height
if (show_graph) { if (show_graph) {
SkRect visualizationRect = SkRect::MakeXYWH(x, y, width, height); SkRect visualization_rect = SkRect::MakeXYWH(x, y, width, height);
stopwatch.visualize(canvas, visualizationRect); stopwatch.Visualize(canvas, visualization_rect);
} }
if (show_labels) { if (show_labels) {
double msPerFrame = stopwatch.maxDelta().InMillisecondsF(); double ms_per_frame = stopwatch.MaxDelta().InMillisecondsF();
double fps; double fps;
if (msPerFrame < instrumentation::kOneFrameMS) { if (ms_per_frame < kOneFrameMS) {
fps = 1e3 / instrumentation::kOneFrameMS; fps = 1e3 / kOneFrameMS;
} else { } else {
fps = 1e3 / msPerFrame; fps = 1e3 / ms_per_frame;
} }
std::stringstream stream; std::stringstream stream;
stream.setf(std::ios::fixed | std::ios::showpoint); stream.setf(std::ios::fixed | std::ios::showpoint);
stream << std::setprecision(1); stream << std::setprecision(1);
stream << label_prefix << " " << fps << " fps " stream << label_prefix << " " << fps << " fps "
<< msPerFrame << "ms/frame"; << ms_per_frame << "ms/frame";
DrawStatisticsText(canvas, stream.str(), x + labelX, y + height + labelY); DrawStatisticsText(canvas, stream.str(), x + label_x, y + height + label_y);
} }
} }
} // namespace } // namespace
PerformanceOverlayLayer::PerformanceOverlayLayer(uint64_t enabledOptions) PerformanceOverlayLayer::PerformanceOverlayLayer(uint64_t options)
: options_(enabledOptions) { : options_(options) {
} }
......
...@@ -17,7 +17,7 @@ const int kVisualizeEngineStatistics = 0x08; ...@@ -17,7 +17,7 @@ const int kVisualizeEngineStatistics = 0x08;
class PerformanceOverlayLayer : public Layer { class PerformanceOverlayLayer : public Layer {
public: public:
explicit PerformanceOverlayLayer(uint64_t enabledOptions); explicit PerformanceOverlayLayer(uint64_t options);
void Paint(PaintContext::ScopedFrame& frame) override; void Paint(PaintContext::ScopedFrame& frame) override;
......
...@@ -21,8 +21,8 @@ PictureLayer::~PictureLayer() { ...@@ -21,8 +21,8 @@ PictureLayer::~PictureLayer() {
void PictureLayer::Preroll(PrerollContext* context, void PictureLayer::Preroll(PrerollContext* context,
const SkMatrix& matrix) { const SkMatrix& matrix) {
image_ = context->frame.context().raster_cache().GetPrerolledImage( image_ = context->raster_cache.GetPrerolledImage(
context->frame.gr_context(), picture_.get(), matrix); context->gr_context, picture_.get(), matrix);
context->child_paint_bounds = picture_->cullRect().makeOffset(offset_.x(), offset_.y()); context->child_paint_bounds = picture_->cullRect().makeOffset(offset_.x(), offset_.y());
} }
......
...@@ -12,17 +12,17 @@ namespace flow { ...@@ -12,17 +12,17 @@ namespace flow {
PaintContext::PaintContext() { PaintContext::PaintContext() {
} }
void PaintContext::beginFrame(ScopedFrame& frame, bool enableInstrumentation) { void PaintContext::BeginFrame(ScopedFrame& frame, bool enableInstrumentation) {
if (enableInstrumentation) { if (enableInstrumentation) {
frame_count_.increment(); frame_count_.Increment();
frame_time_.start(); frame_time_.Start();
} }
} }
void PaintContext::endFrame(ScopedFrame& frame, bool enableInstrumentation) { void PaintContext::EndFrame(ScopedFrame& frame, bool enableInstrumentation) {
raster_cache_.SweepAfterFrame(); raster_cache_.SweepAfterFrame();
if (enableInstrumentation) { if (enableInstrumentation) {
frame_time_.stop(); frame_time_.Stop();
} }
} }
...@@ -37,13 +37,13 @@ PaintContext::ScopedFrame::ScopedFrame(PaintContext& context, ...@@ -37,13 +37,13 @@ PaintContext::ScopedFrame::ScopedFrame(PaintContext& context,
bool instrumentation_enabled) bool instrumentation_enabled)
: context_(context), gr_context_(gr_context), canvas_(&canvas), : context_(context), gr_context_(gr_context), canvas_(&canvas),
instrumentation_enabled_(instrumentation_enabled) { instrumentation_enabled_(instrumentation_enabled) {
context_.beginFrame(*this, instrumentation_enabled_); context_.BeginFrame(*this, instrumentation_enabled_);
} }
PaintContext::ScopedFrame::ScopedFrame(ScopedFrame&& frame) = default; PaintContext::ScopedFrame::ScopedFrame(ScopedFrame&& frame) = default;
PaintContext::ScopedFrame::~ScopedFrame() { PaintContext::ScopedFrame::~ScopedFrame() {
context_.endFrame(*this, instrumentation_enabled_); context_.EndFrame(*this, instrumentation_enabled_);
} }
PaintContext::~PaintContext() { PaintContext::~PaintContext() {
......
...@@ -54,19 +54,19 @@ class PaintContext { ...@@ -54,19 +54,19 @@ class PaintContext {
void OnGrContextDestroyed(); void OnGrContextDestroyed();
RasterCache& raster_cache() { return raster_cache_; } RasterCache& raster_cache() { return raster_cache_; }
const instrumentation::Counter& frame_count() const { return frame_count_; } const Counter& frame_count() const { return frame_count_; }
const instrumentation::Stopwatch& frame_time() const { return frame_time_; } const Stopwatch& frame_time() const { return frame_time_; }
instrumentation::Stopwatch& engine_time() { return engine_time_; }; Stopwatch& engine_time() { return engine_time_; };
private: private:
RasterCache raster_cache_; RasterCache raster_cache_;
instrumentation::Counter frame_count_; Counter frame_count_;
instrumentation::Stopwatch frame_time_; Stopwatch frame_time_;
instrumentation::Stopwatch engine_time_; Stopwatch engine_time_;
void beginFrame(ScopedFrame& frame, bool enableInstrumentation); void BeginFrame(ScopedFrame& frame, bool enableInstrumentation);
void endFrame(ScopedFrame& frame, bool enableInstrumentation); void EndFrame(ScopedFrame& frame, bool enableInstrumentation);
DISALLOW_COPY_AND_ASSIGN(PaintContext); DISALLOW_COPY_AND_ASSIGN(PaintContext);
}; };
......
...@@ -85,7 +85,7 @@ void RasterizerDirect::Draw(uint64_t layer_tree_ptr, ...@@ -85,7 +85,7 @@ void RasterizerDirect::Draw(uint64_t layer_tree_ptr,
// There is no way for the compositor to know how long the layer tree // There is no way for the compositor to know how long the layer tree
// construction took. Fortunately, the layer tree does. Grab that time // construction took. Fortunately, the layer tree does. Grab that time
// for instrumentation. // for instrumentation.
paint_context_.engine_time().setLapTime(layer_tree->construction_time()); paint_context_.engine_time().SetLapTime(layer_tree->construction_time());
{ {
EnsureGLContext(); EnsureGLContext();
...@@ -104,7 +104,7 @@ void RasterizerDirect::Draw(uint64_t layer_tree_ptr, ...@@ -104,7 +104,7 @@ void RasterizerDirect::Draw(uint64_t layer_tree_ptr,
bool frameExceededThreshold = false; bool frameExceededThreshold = false;
uint32_t thresholdInterval = layer_tree->rasterizer_tracing_threshold(); uint32_t thresholdInterval = layer_tree->rasterizer_tracing_threshold();
if (thresholdInterval != 0 && if (thresholdInterval != 0 &&
paint_context_.frame_time().lastLap().InMillisecondsF() > paint_context_.frame_time().LastLap().InMillisecondsF() >
thresholdInterval * kOneFrameDuration) { thresholdInterval * kOneFrameDuration) {
// While rendering the last frame, if we exceeded the tracing threshold // While rendering the last frame, if we exceeded the tracing threshold
// specified in the layer tree, we force a trace to disk. // specified in the layer tree, we force a trace to disk.
......
...@@ -82,6 +82,8 @@ void RasterizerMojo::Draw(uint64_t layer_tree_ptr, ...@@ -82,6 +82,8 @@ void RasterizerMojo::Draw(uint64_t layer_tree_ptr,
return; return;
} }
paint_context_.engine_time().SetLapTime(layer_tree->construction_time());
std::unique_ptr<mojo::GLTexture> texture = std::unique_ptr<mojo::GLTexture> texture =
gl_state_->gl_texture_recycler.GetTexture(size); gl_state_->gl_texture_recycler.GetTexture(size);
DCHECK(texture); DCHECK(texture);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册