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

Issue 10823378: Cache image data objects. (Closed)

Created:
8 years, 4 months ago by brettw
Modified:
8 years, 4 months ago
Reviewers:
yzshen, yzshen1
CC:
chromium-reviews, darin-cc_chromium.org
Visibility:
Public.

Description

Cache image data objects. This will re-use ImageData and mapped memory when you do ReplaceContents within a few seconds of doing a previous one. Hopefully this will speed up 2D painting. BUG=142507 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=152792

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 11

Patch Set 5 : now with test #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 3

Patch Set 8 : git try #

Unified diffs Side-by-side diffs Delta from patch set Stats (+450 lines, -31 lines) Patch
M ppapi/examples/2d/paint_manager_example.cc View 4 chunks +6 lines, -2 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_graphics_2d_proxy.cc View 1 2 3 4 5 4 chunks +21 lines, -3 lines 0 comments Download
M ppapi/proxy/ppb_image_data_proxy.h View 4 chunks +8 lines, -1 line 0 comments Download
M ppapi/proxy/ppb_image_data_proxy.cc View 1 2 3 4 5 6 7 10 chunks +307 lines, -5 lines 0 comments Download
M ppapi/tests/test_graphics_2d.h View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M ppapi/tests/test_graphics_2d.cc View 1 2 3 4 5 6 7 4 chunks +60 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_graphics_2d_api.h View 1 2 3 4 5 1 chunk +12 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_graphics_2d_thunk.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_2d_impl.h View 2 chunks +5 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_2d_impl.cc View 1 2 3 4 5 4 chunks +16 lines, -5 lines 0 comments Download
M webkit/plugins/ppapi/ppb_image_data_impl.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_image_data_impl.cc View 1 2 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
brettw
I did not do the resource ID remapping. I started doing this and was not ...
8 years, 4 months ago (2012-08-21 20:56:09 UTC) #1
brettw
Hi Yuzhu, Can you look at this? Trung says he's busy. I'm going to write ...
8 years, 4 months ago (2012-08-21 21:18:04 UTC) #2
yzshen
Sure. Working on it. On Tue, Aug 21, 2012 at 2:18 PM, <brettw@chromium.org> wrote: > ...
8 years, 4 months ago (2012-08-21 21:23:46 UTC) #3
yzshen1
Cool! Thanks! https://chromiumcodereview.appspot.com/10823378/diff/3012/ppapi/proxy/ppapi_messages.h File ppapi/proxy/ppapi_messages.h (right): https://chromiumcodereview.appspot.com/10823378/diff/3012/ppapi/proxy/ppapi_messages.h#newcode438 ppapi/proxy/ppapi_messages.h:438: IPC_MESSAGE_ROUTED1(PpapiPluginMsg_PPBImageData_NotifyUnusedImageData, nit: most of the messages sent ...
8 years, 4 months ago (2012-08-21 22:07:24 UTC) #4
brettw
New upload with test, PTAL. https://chromiumcodereview.appspot.com/10823378/diff/3012/ppapi/proxy/ppb_image_data_proxy.cc File ppapi/proxy/ppb_image_data_proxy.cc (right): https://chromiumcodereview.appspot.com/10823378/diff/3012/ppapi/proxy/ppb_image_data_proxy.cc#newcode227 ppapi/proxy/ppb_image_data_proxy.cc:227: base::WeakPtrFactory<ImageDataCache> weak_factory_; I added ...
8 years, 4 months ago (2012-08-21 23:24:58 UTC) #5
yzshen1
8 years, 4 months ago (2012-08-21 23:42:44 UTC) #6
LGTM

Thanks!

https://chromiumcodereview.appspot.com/10823378/diff/6018/ppapi/proxy/ppb_ima...
File ppapi/proxy/ppb_image_data_proxy.cc (right):

https://chromiumcodereview.appspot.com/10823378/diff/6018/ppapi/proxy/ppb_ima...
ppapi/proxy/ppb_image_data_proxy.cc:93: // plugin has to be painting at least
two frames for this time interfacl to
interfacl -> interval. :)

https://chromiumcodereview.appspot.com/10823378/diff/6018/ppapi/tests/test_gr...
File ppapi/tests/test_graphics_2d.cc (right):

https://chromiumcodereview.appspot.com/10823378/diff/6018/ppapi/tests/test_gr...
ppapi/tests/test_graphics_2d.cc:702: // re-used objects. Howevever, our current
implementation does this so its
its->it is

https://chromiumcodereview.appspot.com/10823378/diff/6018/ppapi/tests/test_gr...
ppapi/tests/test_graphics_2d.cc:715: // Do two replace contentses, adding the
shared memory pointers to our map.
please update the comment: we are not adding shared memory pointers.

Powered by Google App Engine
This is Rietveld 408576698