mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Add more raster traces (flutter/engine#37510)
This commit is contained in:
parent
e71d150d36
commit
0a11bb12d7
@ -35,6 +35,7 @@ SurfaceFrame::SurfaceFrame(sk_sp<SkSurface> surface,
|
||||
}
|
||||
|
||||
bool SurfaceFrame::Submit() {
|
||||
TRACE_EVENT0("flutter", "SurfaceFrame::Submit");
|
||||
if (submitted_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -464,6 +464,7 @@ RasterStatus Rasterizer::DoDraw(
|
||||
RasterStatus Rasterizer::DrawToSurface(
|
||||
FrameTimingsRecorder& frame_timings_recorder,
|
||||
flutter::LayerTree& layer_tree) {
|
||||
TRACE_EVENT0("flutter", "Rasterizer::DrawToSurface");
|
||||
FML_DCHECK(surface_);
|
||||
|
||||
RasterStatus raster_status;
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
|
||||
#include "flutter/fml/make_copyable.h"
|
||||
#include "flutter/fml/mapping.h"
|
||||
#include "flutter/fml/trace_event.h"
|
||||
#include "flutter/impeller/display_list/display_list_dispatcher.h"
|
||||
#include "flutter/impeller/renderer/backend/metal/surface_mtl.h"
|
||||
|
||||
@ -42,6 +43,8 @@ bool GPUSurfaceMetalImpeller::IsValid() {
|
||||
|
||||
// |Surface|
|
||||
std::unique_ptr<SurfaceFrame> GPUSurfaceMetalImpeller::AcquireFrame(const SkISize& frame_info) {
|
||||
TRACE_EVENT0("impeller", "GPUSurfaceMetalImpeller::AcquireFrame");
|
||||
|
||||
if (!IsValid()) {
|
||||
FML_LOG(ERROR) << "Metal surface was invalid.";
|
||||
return nullptr;
|
||||
|
||||
@ -586,6 +586,8 @@ SkRect FlutterPlatformViewsController::GetPlatformViewRect(int view_id) {
|
||||
bool FlutterPlatformViewsController::SubmitFrame(GrDirectContext* gr_context,
|
||||
const std::shared_ptr<IOSContext>& ios_context,
|
||||
std::unique_ptr<SurfaceFrame> frame) {
|
||||
TRACE_EVENT0("flutter", "FlutterPlatformViewsController::SubmitFrame");
|
||||
|
||||
// Any UIKit related code has to run on main thread.
|
||||
FML_DCHECK([[NSThread currentThread] isMainThread]);
|
||||
if (flutter_view_ == nullptr) {
|
||||
@ -600,8 +602,8 @@ bool FlutterPlatformViewsController::SubmitFrame(GrDirectContext* gr_context,
|
||||
// Resolve all pending GPU operations before allocating a new surface.
|
||||
background_canvas->flush();
|
||||
|
||||
// Clipping the background canvas before drawing the picture recorders requires to
|
||||
// save and restore the clip context.
|
||||
// Clipping the background canvas before drawing the picture recorders requires
|
||||
// saving and restoring the clip context.
|
||||
SkAutoCanvasRestore save(background_canvas, /*doSave=*/true);
|
||||
|
||||
// Maps a platform view id to a vector of `FlutterPlatformViewLayer`.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user