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

Issue 149784: Add RawData request in preparation for manual loading of... (Closed)

Created:
11 years, 5 months ago by gman
Modified:
9 years, 7 months ago
Reviewers:
Chris Rogers
CC:
o3d-review_googlegroups.com
Visibility:
Public.

Description

Add RawData request in preparation for manual loading of Bitmaps and being able to flip them, scale them, etc... Basically this just makes it possible to download a RawData directly which you can then pass you'll be able to pass to pack->CreateBitmapFromRawData. Some design comments: I used SetFromFile instead of making a different constructor since it seemed wrong to do file IO in a constructor. Given that SetFromFile is private I don't think this is a problem since you can't call it directly. Also, I thought about loading the file first and then calling the original constructor but it seemed like a waste to load the file into memory, then copy it to a new buffer when I could just load it directly. Finally I made it take a String instead of a FilePath because it meant other places had to do less work. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21015

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+220 lines, -32 lines) Patch
M core/cross/bitmap.cc View 1 chunk +25 lines, -26 lines 0 comments Download
M core/cross/file_request.h View 6 chunks +14 lines, -1 line 0 comments Download
M import/cross/raw_data.h View 3 chunks +8 lines, -0 lines 0 comments Download
M import/cross/raw_data.cc View 3 chunks +52 lines, -0 lines 0 comments Download
M import/cross/raw_data_test.cc View 2 chunks +38 lines, -0 lines 0 comments Download
M plugin/cross/async_loading.h View 2 chunks +3 lines, -3 lines 0 comments Download
M plugin/cross/async_loading.cc View 4 chunks +68 lines, -0 lines 1 comment Download
M plugin/idl/file_request.idl View 1 chunk +7 lines, -0 lines 0 comments Download
M plugin/idl/pack.idl View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
gman
11 years, 5 months ago (2009-07-17 01:58:09 UTC) #1
Chris Rogers
11 years, 5 months ago (2009-07-17 18:47:16 UTC) #2
LGTM with one small comment

http://codereview.chromium.org/149784/diff/1/6
File plugin/cross/async_loading.cc (right):

http://codereview.chromium.org/149784/diff/1/6#newcode174
Line 174: request_->set_error("Could not download texture: " + request_->uri());
should be:  "Could not download raw data"

Powered by Google App Engine
This is Rietveld 408576698