chromium building with ninja, and third_party tools

160 views
Skip to first unread message

Marten Luter

unread,
Feb 15, 2015, 7:03:55 AM2/15/15
to chromi...@chromium.org
I am using ninja build on linux system.

ninja -C out/Default chrome


If I am changing something in src/third_party/webkit or src/chrome , ninja know this and run only partial rebuild. But it does not work with skia sources from "src/third_party/skia" if i am changing for example 
src/third_party/skia/src/images/SkImageEncoder.cpp for debuging purposes 

> ninja -C out/Default chrome 

says.

ninja: Entering directory `out/Default'
ninja: no work to do.

I have tried to find out skia target on ninja build but it does make any changes.

Does anybody know why ? And how can i rebuild skia and then link it to chrome binary without whole code recompiling ? 

Nico Weber

unread,
Feb 15, 2015, 5:22:12 PM2/15/15
to ent...@googlemail.com, Chromium-dev
That's because SkImageEncoder.cpp isn't used in a chromium build, as far as I can tell. It's only referenced from third_party/skia/gyp/images.gyp ( https://code.google.com/p/chromium/codesearch#chromium/src/third_party/skia/gyp/images.gyp&q=SkImageEncoder.cpp%20file:gyp&sq=package:chromium&l=63 ) in the project "skia_images", and nothing depends on that target ( https://code.google.com/p/chromium/codesearch#chromium/src/third_party/skia/gyp/images.gyp&q=skia_images%20file:gyp&sq=package:chromium&type=cs&l=6 ). If you want to hack on that file in a Chromium build for some good reason, you can locally add a dependency on third_party/skia/gyp/images.gyp:skia_images somewhere in build/all.gyp and re-run `gclient runhooks`. Then ninja will know about that target and you can rebuild it with `ninja -C out/Default skia_images`.

Oh, since you're using "out/Default", you're probably using gn. The reasoning is likely similar there (but sometimes stuff is just randomly missing in the gn build, as it's not complete yet), but I don't know details.

If you're trying to find out what chrome uses for encoding images, you've already discovered that it can't be that file as it's not part of the 'chrome' target :-)

Nico

Jeremy Roman

unread,
Feb 15, 2015, 10:35:17 PM2/15/15
to Nico Weber, Marten Luter, Chromium-dev
Chrome's copy (at least on Linux, but I think everywhere) of SkImageEncoder is this one, an empty implementation:
which is referenced here:

I think the actual image encoding is around here:
Blink: third_party/WebKit/Source/platform/image-encoders/
Chromium: ui/gfx/codec/

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Reply all
Reply to author
Forward
0 new messages