STORM-64: Local Bitmaps 3.0 implementation.
Review Request #566 - Created March 23, 2012 and submitted
Vaalith Jinn | Reviewers | ||
viewer | |||
STORM-64 | callum_linden, richard.linden | ||
None | viewer-development |
Local Bitmaps is a mechanism to locally load images into the viewer, track them and have it check if the image has been overwritten locally and if so - update it in the viewer and inworld. This change affects the texture picker - adding radio checks that let the user choose between the "Inventory" (regular inventory) and "Local" tabs (list of locally added files). *** DO NOT USE THIS YET *** do not implement for live viewers until fully reviewed.
Posted (March 28, 2012, 9:58 a.m.)
A couple of things to look at, but overall very very nice looking code.
-
indra/newview/lllocalbitmaps.h (Diff revision 1) -
Minor point ... it would be clearer to have the parameter be an enum whose values were first_use and texture_updated or something. Just because something only has two values doesn't make it a 'bool'.
-
indra/newview/lllocalbitmaps.cpp (Diff revision 1) -
Would an LL_WARN be appropriate here?
-
indra/newview/lllocalbitmaps.cpp (Diff revision 1) -
The cases in this switch all fall through if something unexpected happens... and there's no code to handle the unexpected. If falling through is intentional, there should be a comment saying so, and if not the break should follow the end of the (missing) else block.
-
indra/newview/lllocalbitmaps.cpp (Diff revision 1) -
you could shorten this loop by adding ' && add_object ' to the termination condition
-
indra/newview/lllocalbitmaps.cpp (Diff revision 1) -
clearer to put the assignment in the first clause of the for loop
-
indra/newview/lllocalbitmaps.cpp (Diff revision 1) -
I'd prefer a single 'return result;' at the bottom, replacing all those scattered ones with 'break;' because it's easier to set breakpoints on.
Review request changed
Updated (March 28, 2012, 9:59 a.m.)
-
- added callum_linden, richard.linden
Review request changed
Updated (March 29, 2012, 5:12 a.m.)
-
- added Diff r2
Included fd797a815c0a STORM-64: small fix for building on linux. Included 3e3ba231afb0 STORM-64: various fixes pointed out at codereview. Both of these already in the https://bitbucket.org/serpentu/storm-64-new repo.
Posted (March 29, 2012, 5:28 a.m.)
-
indra/newview/lllocalbitmaps.h (Diff revision 1) -
For clarity's sake i kept private enums block below where it's currently at. If i were to add an enum value in here i'd have to either move the whole block up to keep consistency or break consistency and write in a single enum below the main public block.. Neither is a really pretty solution as far as readability is concerned. Is it really worth it?
Posted (March 30, 2012, 7:39 a.m.)
-
indra/newview/lllocalbitmaps.cpp (Diff revision 2) -
Need 'break;' here.
-
indra/newview/lllocalbitmaps.cpp (Diff revision 2) -
Need 'break;' here.
-
indra/newview/lllocalbitmaps.cpp (Diff revision 2) -
Need 'break;' here.
-
indra/newview/lllocalbitmaps.cpp (Diff revision 2) -
log the fact that it's an unknown wearable type here?
Review request changed
Updated (March 30, 2012, 4:06 p.m.)
-
- added Diff r3
5790e41deb9e STORM-64: Additional fixes from codereview.
Review request changed
Updated (April 3, 2012, 1:22 p.m.)
-
- added Diff r4
STORM-64: fix for crash under STORM-1837, added a warn on invalid/unreadable bitmap, and changed a bool to enum.
Review request changed
Updated (April 9, 2012, 7:50 a.m.)
-
- added Diff r5
Added Oz's patch for bad png detection. Added toasts on critical update cycle errors.
Review request changed
Updated (April 9, 2012, 9:57 a.m.)
-
- added Diff r6
-
Local Bitmaps is a mechanism to locally load images into the viewer, track them and optionally (per each image) have it check if the image has been overwritten locally and if so - update it in the viewer and inworld. This change affects the texture picker - adding radio checks that let the user choose between the "Inventory" (regular inventory) and "Local" tabs (list of locally added files). *** DO NOT USE THIS YET *** do not implement for live viewers until fully reviewed.
Local Bitmaps is a mechanism to locally load images into the viewer, track them and have it check if the image has been overwritten locally and if so - update it in the viewer and inworld. This change affects the texture picker - adding radio checks that let the user choose between the "Inventory" (regular inventory) and "Local" tabs (list of locally added files). *** DO NOT USE THIS YET *** do not implement for live viewers until fully reviewed.
Added more toast to trigger on images that fail during the initial load.
Review request changed
Updated (April 12, 2012, 7:28 a.m.)
- changed from pending to submitted
Other reviews