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

Issue 197883017: SkColorType instead of (deprecated) SkBitmap::Config (Closed)

Created:
6 years, 9 months ago by reed1
Modified:
6 years, 9 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, Tom Hudson, Stephen White, reveman
Visibility:
Public.

Description

SkColorType instead of (deprecated) SkBitmap::Config Part of this refactoring was the recognition of a common pattern: - setConfig + alloc + setImmutable + pass_to_UIResourceBitmap This CL introduces a direct way on UIResourceBitmap to create such a bitmap, by just specifying its dimensions. This encapsulates internal requirements (e.g. colortype and immutability). Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=259349

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 14

Patch Set 3 : setImmutable in new constructor, check for zero stride #

Patch Set 4 : #

Patch Set 5 : rebase #

Total comments: 22

Patch Set 6 : address comments from #5 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -159 lines) Patch
M cc/layers/heads_up_display_layer_impl.cc View 1 2 3 4 5 1 chunk +6 lines, -5 lines 0 comments Download
M cc/layers/nine_patch_layer_impl_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -6 lines 0 comments Download
M cc/layers/nine_patch_layer_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -6 lines 0 comments Download
M cc/layers/painted_scrollbar_layer.cc View 1 chunk +1 line, -5 lines 0 comments Download
M cc/layers/ui_resource_layer_impl_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -9 lines 0 comments Download
M cc/layers/ui_resource_layer_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -8 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 chunks +3 lines, -7 lines 0 comments Download
M cc/output/renderer_pixeltest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M cc/resources/bitmap_content_layer_updater.cc View 1 chunk +2 lines, -5 lines 0 comments Download
M cc/resources/picture_pile_impl_unittest.cc View 1 2 2 chunks +2 lines, -8 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 2 3 4 5 4 chunks +24 lines, -29 lines 0 comments Download
M cc/resources/resource_provider_unittest.cc View 1 2 5 chunks +6 lines, -10 lines 0 comments Download
M cc/resources/resource_update_controller_unittest.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M cc/resources/ui_resource_bitmap.h View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M cc/resources/ui_resource_bitmap.cc View 1 2 3 4 5 3 chunks +14 lines, -3 lines 0 comments Download
M cc/test/fake_scoped_ui_resource.cc View 1 2 3 4 5 1 chunk +2 lines, -5 lines 0 comments Download
M cc/test/layer_tree_json_parser.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M cc/test/layer_tree_pixel_test.cc View 2 chunks +2 lines, -6 lines 0 comments Download
M cc/test/skia_common.cc View 1 chunk +5 lines, -12 lines 0 comments Download
M cc/test/tiled_layer_test_common.cc View 1 chunk +1 line, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 2 chunks +4 lines, -12 lines 0 comments Download
M cc/trees/layer_tree_host_pixeltest_masks.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M cc/trees/layer_tree_host_pixeltest_readback.cc View 1 chunk +4 lines, -9 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
reed1
6 years, 9 months ago (2014-03-17 19:42:06 UTC) #1
enne (OOO)
https://codereview.chromium.org/197883017/diff/20001/cc/layers/ui_resource_layer_unittest.cc File cc/layers/ui_resource_layer_unittest.cc (right): https://codereview.chromium.org/197883017/diff/20001/cc/layers/ui_resource_layer_unittest.cc#newcode68 cc/layers/ui_resource_layer_unittest.cc:68: bitmap.allocN32Pixels(10, 10); Can this be part of the ctor ...
6 years, 9 months ago (2014-03-18 19:20:20 UTC) #2
reed1
https://codereview.chromium.org/197883017/diff/20001/cc/layers/ui_resource_layer_unittest.cc File cc/layers/ui_resource_layer_unittest.cc (right): https://codereview.chromium.org/197883017/diff/20001/cc/layers/ui_resource_layer_unittest.cc#newcode68 cc/layers/ui_resource_layer_unittest.cc:68: bitmap.allocN32Pixels(10, 10); On 2014/03/18 19:20:21, enne wrote: > Can ...
6 years, 9 months ago (2014-03-18 19:33:07 UTC) #3
enne (OOO)
I think the UIResource cleanup looks fine to me. I don't know that I know ...
6 years, 9 months ago (2014-03-18 19:43:02 UTC) #4
Stephen White
https://codereview.chromium.org/197883017/diff/20001/cc/layers/heads_up_display_layer_impl.cc File cc/layers/heads_up_display_layer_impl.cc (right): https://codereview.chromium.org/197883017/diff/20001/cc/layers/heads_up_display_layer_impl.cc#newcode175 cc/layers/heads_up_display_layer_impl.cc:175: const void* pixels = hud_canvas_->peekPixels(&info, &rowBytes); It looks like ...
6 years, 9 months ago (2014-03-18 20:14:06 UTC) #5
reed1
ptal -- uploaded changes in response to your comments, and to fix unitttest failures. https://codereview.chromium.org/197883017/diff/20001/cc/layers/heads_up_display_layer_impl.cc ...
6 years, 9 months ago (2014-03-21 20:49:01 UTC) #6
reed1
ptal - are there other questions about the CL?
6 years, 9 months ago (2014-03-25 11:39:38 UTC) #7
Stephen White
LGTM
6 years, 9 months ago (2014-03-25 12:08:54 UTC) #8
reed1
The CQ bit was checked by reed@google.com
6 years, 9 months ago (2014-03-25 12:12:53 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reed@google.com/197883017/60001
6 years, 9 months ago (2014-03-25 12:13:00 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-25 12:15:38 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_compile_dbg
6 years, 9 months ago (2014-03-25 12:15:39 UTC) #12
reed1
ptal -- cc/ owner
6 years, 9 months ago (2014-03-25 13:29:44 UTC) #13
danakj
https://codereview.chromium.org/197883017/diff/70001/cc/layers/heads_up_display_layer_impl.cc File cc/layers/heads_up_display_layer_impl.cc (right): https://codereview.chromium.org/197883017/diff/70001/cc/layers/heads_up_display_layer_impl.cc#newcode174 cc/layers/heads_up_display_layer_impl.cc:174: size_t rowBytes; size_t row_bytes = 0; (name style + ...
6 years, 9 months ago (2014-03-25 16:13:59 UTC) #14
reed1
ptal https://codereview.chromium.org/197883017/diff/70001/cc/layers/heads_up_display_layer_impl.cc File cc/layers/heads_up_display_layer_impl.cc (right): https://codereview.chromium.org/197883017/diff/70001/cc/layers/heads_up_display_layer_impl.cc#newcode174 cc/layers/heads_up_display_layer_impl.cc:174: size_t rowBytes; On 2014/03/25 16:13:59, danakj wrote: > ...
6 years, 9 months ago (2014-03-25 17:19:40 UTC) #15
danakj
https://codereview.chromium.org/197883017/diff/70001/cc/resources/ui_resource_bitmap.h File cc/resources/ui_resource_bitmap.h (right): https://codereview.chromium.org/197883017/diff/70001/cc/resources/ui_resource_bitmap.h#newcode47 cc/resources/ui_resource_bitmap.h:47: UIResourceBitmap(int width, int height, bool isOpaque = false); On ...
6 years, 9 months ago (2014-03-25 17:31:29 UTC) #16
danakj
Thanks, LGTM
6 years, 9 months ago (2014-03-25 17:33:43 UTC) #17
reed1
https://codereview.chromium.org/197883017/diff/70001/cc/trees/layer_tree_host_pixeltest_readback.cc File cc/trees/layer_tree_host_pixeltest_readback.cc (left): https://codereview.chromium.org/197883017/diff/70001/cc/trees/layer_tree_host_pixeltest_readback.cc#oldcode1117 cc/trees/layer_tree_host_pixeltest_readback.cc:1117: scoped_ptr<SkAutoLockPixels> lock(new SkAutoLockPixels(*bitmap)); On 2014/03/25 17:31:29, danakj wrote: > ...
6 years, 9 months ago (2014-03-25 17:35:53 UTC) #18
reed1
The CQ bit was checked by reed@google.com
6 years, 9 months ago (2014-03-25 17:36:09 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reed@google.com/197883017/180001
6 years, 9 months ago (2014-03-25 17:36:44 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-25 19:35:45 UTC) #21
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) content_browsertests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=287693
6 years, 9 months ago (2014-03-25 19:35:46 UTC) #22
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 9 months ago (2014-03-25 19:37:46 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reed@google.com/197883017/180001
6 years, 9 months ago (2014-03-25 19:38:59 UTC) #24
commit-bot: I haz the power
6 years, 9 months ago (2014-03-25 22:00:53 UTC) #25
Message was sent while issue was closed.
Change committed as 259349

Powered by Google App Engine
This is Rietveld 408576698