diff options
-rw-r--r-- | ui/gfx/codec/jpeg_codec.cc | 2 | ||||
-rw-r--r-- | ui/gfx/color_analysis.cc | 2 | ||||
-rw-r--r-- | ui/gfx/gdi_util.cc | 4 | ||||
-rw-r--r-- | ui/gfx/gtk_util.cc | 6 | ||||
-rw-r--r-- | ui/gfx/icon_util.cc | 4 | ||||
-rw-r--r-- | ui/gfx/path_gtk.cc | 4 | ||||
-rw-r--r-- | ui/gfx/path_win.cc | 4 | ||||
-rw-r--r-- | ui/gfx/render_text_win.cc | 2 | ||||
-rw-r--r-- | ui/gfx/render_text_win.h | 14 |
9 files changed, 21 insertions, 21 deletions
diff --git a/ui/gfx/codec/jpeg_codec.cc b/ui/gfx/codec/jpeg_codec.cc index 1cfd68d..bb4e640 100644 --- a/ui/gfx/codec/jpeg_codec.cc +++ b/ui/gfx/codec/jpeg_codec.cc @@ -589,7 +589,7 @@ bool JPEGCodec::Decode(const unsigned char* input, size_t input_size, output->resize(row_write_stride * cinfo.output_height); - scoped_array<unsigned char> row_data(new unsigned char[row_read_stride]); + scoped_ptr<unsigned char[]> row_data(new unsigned char[row_read_stride]); unsigned char* rowptr = row_data.get(); for (int row = 0; row < static_cast<int>(cinfo.output_height); row++) { if (!jpeg_read_scanlines(&cinfo, &rowptr, 1)) diff --git a/ui/gfx/color_analysis.cc b/ui/gfx/color_analysis.cc index 6a6cdca..2925c06 100644 --- a/ui/gfx/color_analysis.cc +++ b/ui/gfx/color_analysis.cc @@ -385,7 +385,7 @@ SkColor CalculateKMeanColorOfBitmap(const SkBitmap& bitmap) { // above uses non-pre-multiplied alpha. Transform the bitmap before we // analyze it because the function reads each pixel multiple times. int pixel_count = bitmap.width() * bitmap.height(); - scoped_array<uint32_t> image(new uint32_t[pixel_count]); + scoped_ptr<uint32_t[]> image(new uint32_t[pixel_count]); UnPreMultiply(bitmap, image.get(), pixel_count); GridSampler sampler; diff --git a/ui/gfx/gdi_util.cc b/ui/gfx/gdi_util.cc index f548628..13f141a 100644 --- a/ui/gfx/gdi_util.cc +++ b/ui/gfx/gdi_util.cc @@ -81,9 +81,9 @@ void SubtractRectanglesFromRegion(HRGN hrgn, HRGN ConvertPathToHRGN(const gfx::Path& path) { #if defined(USE_AURA) int point_count = path.getPoints(NULL, 0); - scoped_array<SkPoint> points(new SkPoint[point_count]); + scoped_ptr<SkPoint[]> points(new SkPoint[point_count]); path.getPoints(points.get(), point_count); - scoped_array<POINT> windows_points(new POINT[point_count]); + scoped_ptr<POINT[]> windows_points(new POINT[point_count]); for (int i = 0; i < point_count; ++i) { windows_points[i].x = SkScalarRound(points[i].fX); windows_points[i].y = SkScalarRound(points[i].fY); diff --git a/ui/gfx/gtk_util.cc b/ui/gfx/gtk_util.cc index bc34224..0c11168 100644 --- a/ui/gfx/gtk_util.cc +++ b/ui/gfx/gtk_util.cc @@ -56,11 +56,11 @@ class GdkCursorCache { namespace gfx { -static void CommonInitFromCommandLine( - const CommandLine& command_line, void (*init_func)(gint*, gchar***)) { +static void CommonInitFromCommandLine(const CommandLine& command_line, + void (*init_func)(gint*, gchar***)) { const std::vector<std::string>& args = command_line.argv(); int argc = args.size(); - scoped_array<char *> argv(new char *[argc + 1]); + scoped_ptr<char *[]> argv(new char *[argc + 1]); for (size_t i = 0; i < args.size(); ++i) { // TODO(piman@google.com): can gtk_init modify argv? Just being safe // here. diff --git a/ui/gfx/icon_util.cc b/ui/gfx/icon_util.cc index 1c87fa9..4f4b4b7 100644 --- a/ui/gfx/icon_util.cc +++ b/ui/gfx/icon_util.cc @@ -91,7 +91,7 @@ HICON IconUtil::CreateHICONFromSkBitmap(const SkBitmap& bitmap) { static_cast<const uint32*>(bitmap.getPixels()), bitmap.width() * bitmap.height()); - scoped_array<uint8> mask_bits; + scoped_ptr<uint8[]> mask_bits; if (!bitmap_has_alpha_channel) { // Bytes per line with paddings to make it word alignment. size_t bytes_per_line = (bitmap.width() + 0xF) / 16 * 2; @@ -249,7 +249,7 @@ SkBitmap IconUtil::CreateSkBitmapFromHICONHelper(HICON icon, // Capture boolean opacity. We may not use it if we find out the bitmap has // an alpha channel. - scoped_array<bool> opaque(new bool[num_pixels]); + scoped_ptr<bool[]> opaque(new bool[num_pixels]); for (size_t i = 0; i < num_pixels; ++i) opaque[i] = !bits[i]; diff --git a/ui/gfx/path_gtk.cc b/ui/gfx/path_gtk.cc index bb1c3fc..99dad2b 100644 --- a/ui/gfx/path_gtk.cc +++ b/ui/gfx/path_gtk.cc @@ -19,10 +19,10 @@ GdkRegion* Path::CreateNativeRegion() const { return NULL; } - scoped_array<SkPoint> points(new SkPoint[point_count]); + scoped_ptr<SkPoint[]> points(new SkPoint[point_count]); getPoints(points.get(), point_count); - scoped_array<GdkPoint> gdk_points(new GdkPoint[point_count]); + scoped_ptr<GdkPoint[]> gdk_points(new GdkPoint[point_count]); for (int i = 0; i < point_count; ++i) { gdk_points[i].x = SkScalarRound(points[i].fX); gdk_points[i].y = SkScalarRound(points[i].fY); diff --git a/ui/gfx/path_win.cc b/ui/gfx/path_win.cc index 35b98d8..be5d9e2 100644 --- a/ui/gfx/path_win.cc +++ b/ui/gfx/path_win.cc @@ -11,9 +11,9 @@ namespace gfx { HRGN CreateHRGNFromSkPath(const SkPath& path) { int point_count = path.getPoints(NULL, 0); - scoped_array<SkPoint> points(new SkPoint[point_count]); + scoped_ptr<SkPoint[]> points(new SkPoint[point_count]); path.getPoints(points.get(), point_count); - scoped_array<POINT> windows_points(new POINT[point_count]); + scoped_ptr<POINT[]> windows_points(new POINT[point_count]); for (int i = 0; i < point_count; ++i) { windows_points[i].x = SkScalarRound(points[i].fX); windows_points[i].y = SkScalarRound(points[i].fY); diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc index b75ec20..d17baee 100644 --- a/ui/gfx/render_text_win.cc +++ b/ui/gfx/render_text_win.cc @@ -600,7 +600,7 @@ void RenderTextWin::LayoutVisualText() { } // Build the array of bidirectional embedding levels. - scoped_array<BYTE> levels(new BYTE[runs_.size()]); + scoped_ptr<BYTE[]> levels(new BYTE[runs_.size()]); for (size_t i = 0; i < runs_.size(); ++i) levels[i] = runs_[i]->script_analysis.s.uBidiLevel; diff --git a/ui/gfx/render_text_win.h b/ui/gfx/render_text_win.h index df33b64..8b42bc9 100644 --- a/ui/gfx/render_text_win.h +++ b/ui/gfx/render_text_win.h @@ -43,13 +43,13 @@ struct TextRun { SCRIPT_ANALYSIS script_analysis; - scoped_array<WORD> glyphs; - scoped_array<WORD> logical_clusters; - scoped_array<SCRIPT_VISATTR> visible_attributes; + scoped_ptr<WORD[]> glyphs; + scoped_ptr<WORD[]> logical_clusters; + scoped_ptr<SCRIPT_VISATTR[]> visible_attributes; int glyph_count; - scoped_array<int> advance_widths; - scoped_array<GOFFSET> offsets; + scoped_ptr<int[]> advance_widths; + scoped_ptr<GOFFSET[]> offsets; ABC abc_widths; SCRIPT_CACHE script_cache; @@ -131,8 +131,8 @@ class RenderTextWin : public RenderText { // largest baseline over all the runs' fonts. int common_baseline_; - scoped_array<int> visual_to_logical_; - scoped_array<int> logical_to_visual_; + scoped_ptr<int[]> visual_to_logical_; + scoped_ptr<int[]> logical_to_visual_; bool needs_layout_; |