Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2682)

Unified Diff: sky/shell/gpu/rasterizer.cc

Issue 1027913002: Add more trace events to Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/shell/gpu/rasterizer.h ('k') | sky/shell/ui/engine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/gpu/rasterizer.cc
diff --git a/sky/shell/gpu/rasterizer.cc b/sky/shell/gpu/rasterizer.cc
index 8fb6836aafcd7741f577693a73ef251013b7dae6..52a5525c8d19d8b3e195fc47094ba3e57e4a7e38 100644
--- a/sky/shell/gpu/rasterizer.cc
+++ b/sky/shell/gpu/rasterizer.cc
@@ -4,6 +4,7 @@
#include "sky/shell/gpu/rasterizer.h"
+#include "base/trace_event/trace_event.h"
#include "sky/shell/gpu/ganesh_context.h"
#include "sky/shell/gpu/ganesh_surface.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -41,6 +42,8 @@ void Rasterizer::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) {
}
void Rasterizer::Draw(skia::RefPtr<SkPicture> picture) {
+ TRACE_EVENT0("sky", "Rasterizer::Draw");
+
if (!surface_)
return;
@@ -52,11 +55,15 @@ void Rasterizer::Draw(skia::RefPtr<SkPicture> picture) {
CHECK(context_->MakeCurrent(surface_.get()));
EnsureGaneshSurface(size);
+ DrawPicture(picture.get());
+ surface_->SwapBuffers();
+}
+
+void Rasterizer::DrawPicture(SkPicture* picture) {
+ TRACE_EVENT0("sky", "Rasterizer::DrawPicture");
SkCanvas* canvas = ganesh_surface_->canvas();
- canvas->drawPicture(picture.get());
+ canvas->drawPicture(picture);
canvas->flush();
-
- surface_->SwapBuffers();
}
void Rasterizer::OnOutputSurfaceDestroyed() {
« no previous file with comments | « sky/shell/gpu/rasterizer.h ('k') | sky/shell/ui/engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698