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

Issue 1156003007: Refactor image handling in Sky (Closed)

Created:
5 years, 6 months ago by jackson
Modified:
5 years, 6 months ago
Reviewers:
abarth-chromium
CC:
abarth-chromium, gregsimon, mojo-reviews_chromium.org, qsr+mojo_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Refactor image handling in Sky to expose the loader and image as separate classes to Dart code. This makes it possible to avoid unnecessary paints, by only painting once when the image has loaded. Now that we've separated the loader and image classes, we can implement an image cache in Dart. R=abarth@chromium.org, abarth Committed: https://chromium.googlesource.com/external/mojo/+/ece46ba7a4b3de176e8a57d6082664b4dc9053ed

Patch Set 1 #

Patch Set 2 : Catch errors in example #

Total comments: 2

Patch Set 3 : CR feedback from abarth #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -141 lines) Patch
M sky/engine/core/core.gni View 3 chunks +5 lines, -2 lines 0 comments Download
A sky/engine/core/loader/CanvasImageLoader.h View 1 2 1 chunk +53 lines, -0 lines 0 comments Download
A sky/engine/core/loader/CanvasImageLoader.cpp View 1 2 1 chunk +54 lines, -0 lines 0 comments Download
A + sky/engine/core/loader/ImageLoader.idl View 1 2 1 chunk +4 lines, -3 lines 1 comment Download
A sky/engine/core/loader/ImageLoaderCallback.h View 1 chunk +20 lines, -0 lines 0 comments Download
A + sky/engine/core/loader/ImageLoaderCallback.idl View 1 chunk +2 lines, -1 line 0 comments Download
D sky/engine/core/loader/NewImageLoader.h View 1 chunk +0 lines, -49 lines 0 comments Download
D sky/engine/core/loader/NewImageLoader.cpp View 1 chunk +0 lines, -53 lines 0 comments Download
M sky/engine/core/painting/CanvasImage.h View 3 chunks +1 line, -11 lines 0 comments Download
M sky/engine/core/painting/CanvasImage.cpp View 2 chunks +1 line, -16 lines 0 comments Download
M sky/engine/core/painting/Image.idl View 1 chunk +0 lines, -1 line 0 comments Download
M sky/examples/raw/spinning_image.dart View 1 2 2 chunks +12 lines, -5 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
jackson
5 years, 6 months ago (2015-06-01 22:52:45 UTC) #1
abarth-chromium
lgtm https://codereview.chromium.org/1156003007/diff/20001/sky/engine/core/loader/ImageLoader.idl File sky/engine/core/loader/ImageLoader.idl (right): https://codereview.chromium.org/1156003007/diff/20001/sky/engine/core/loader/ImageLoader.idl#newcode9 sky/engine/core/loader/ImageLoader.idl:9: void load(DOMString src, ImageLoaderCallback callback); Should ImageLoader support ...
5 years, 6 months ago (2015-06-01 22:57:10 UTC) #2
jackson
https://codereview.chromium.org/1156003007/diff/20001/sky/engine/core/loader/ImageLoader.idl File sky/engine/core/loader/ImageLoader.idl (right): https://codereview.chromium.org/1156003007/diff/20001/sky/engine/core/loader/ImageLoader.idl#newcode9 sky/engine/core/loader/ImageLoader.idl:9: void load(DOMString src, ImageLoaderCallback callback); On 2015/06/01 22:57:09, abarth ...
5 years, 6 months ago (2015-06-01 23:10:26 UTC) #3
jackson
Committed patchset #3 (id:40001) manually as ece46ba7a4b3de176e8a57d6082664b4dc9053ed (presubmit successful).
5 years, 6 months ago (2015-06-01 23:21:26 UTC) #4
abarth-chromium
https://codereview.chromium.org/1156003007/diff/40001/sky/engine/core/loader/ImageLoader.idl File sky/engine/core/loader/ImageLoader.idl (right): https://codereview.chromium.org/1156003007/diff/40001/sky/engine/core/loader/ImageLoader.idl#newcode9 sky/engine/core/loader/ImageLoader.idl:9: void load(); What's the point of having a |load| ...
5 years, 6 months ago (2015-06-01 23:24:49 UTC) #5
jackson
5 years, 6 months ago (2015-06-02 02:11:19 UTC) #6
Message was sent while issue was closed.
On 2015/06/01 at 23:24:49, abarth wrote:
>
https://codereview.chromium.org/1156003007/diff/40001/sky/engine/core/loader/...
> File sky/engine/core/loader/ImageLoader.idl (right):
> 
>
https://codereview.chromium.org/1156003007/diff/40001/sky/engine/core/loader/...
> sky/engine/core/loader/ImageLoader.idl:9: void load();
> What's the point of having a |load| function anymore?  It seems like we could
kick off the load during the constructor...  Maybe having a |cancel| method
would make more sense?

I'll kill |load| for now, we can add cancel some day

Powered by Google App Engine
This is Rietveld 408576698