summaryrefslogtreecommitdiff
path: root/chromium/skia/ext
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-07-17 13:57:45 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-07-19 13:44:40 +0000
commit6ec7b8da05d21a3878bd21c691b41e675d74bb1c (patch)
treeb87f250bc19413750b9bb9cdbf2da20ef5014820 /chromium/skia/ext
parentec02ee4181c49b61fce1c8fb99292dbb8139cc90 (diff)
downloadqtwebengine-chromium-6ec7b8da05d21a3878bd21c691b41e675d74bb1c.tar.gz
BASELINE: Update Chromium to 60.0.3112.70
Change-Id: I9911c2280a014d4632f254857876a395d4baed2d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/skia/ext')
-rw-r--r--chromium/skia/ext/analysis_canvas_unittest.cc6
-rw-r--r--chromium/skia/ext/benchmarking_canvas.cc2
-rw-r--r--chromium/skia/ext/event_tracer_impl.cc3
-rw-r--r--chromium/skia/ext/image_operations.cc1
-rw-r--r--chromium/skia/ext/image_operations_unittest.cc9
-rw-r--r--chromium/skia/ext/platform_canvas.cc5
-rw-r--r--chromium/skia/ext/platform_canvas_unittest.cc1
-rw-r--r--chromium/skia/ext/skia_commit_hash.h2
-rw-r--r--chromium/skia/ext/skia_encode_image.cc21
-rw-r--r--chromium/skia/ext/skia_encode_image.h25
10 files changed, 11 insertions, 64 deletions
diff --git a/chromium/skia/ext/analysis_canvas_unittest.cc b/chromium/skia/ext/analysis_canvas_unittest.cc
index 18a749b6204..a26a1bab2db 100644
--- a/chromium/skia/ext/analysis_canvas_unittest.cc
+++ b/chromium/skia/ext/analysis_canvas_unittest.cc
@@ -2,13 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "skia/ext/analysis_canvas.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "skia/ext/analysis_canvas.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
-#include "third_party/skia/include/core/SkRefCnt.h"
+#include "third_party/skia/include/core/SkRRect.h"
+#include "third_party/skia/include/core/SkRegion.h"
#include "third_party/skia/include/core/SkShader.h"
#include "third_party/skia/include/effects/SkOffsetImageFilter.h"
diff --git a/chromium/skia/ext/benchmarking_canvas.cc b/chromium/skia/ext/benchmarking_canvas.cc
index bcd104396fe..da63a1a3376 100644
--- a/chromium/skia/ext/benchmarking_canvas.cc
+++ b/chromium/skia/ext/benchmarking_canvas.cc
@@ -11,7 +11,9 @@
#include "base/memory/ptr_util.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColorFilter.h"
+#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkImageFilter.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h"
diff --git a/chromium/skia/ext/event_tracer_impl.cc b/chromium/skia/ext/event_tracer_impl.cc
index be92583eb4e..82d35a61e06 100644
--- a/chromium/skia/ext/event_tracer_impl.cc
+++ b/chromium/skia/ext/event_tracer_impl.cc
@@ -73,6 +73,5 @@ void
void InitSkiaEventTracer() {
// Initialize the binding to Skia's tracing events. Skia will
// take ownership of and clean up the memory allocated here.
- if (!SkEventTracer::GetInstance())
- SkEventTracer::SetInstance(new skia::SkChromiumEventTracer());
+ SkEventTracer::SetInstance(new skia::SkChromiumEventTracer());
}
diff --git a/chromium/skia/ext/image_operations.cc b/chromium/skia/ext/image_operations.cc
index 318ae501d8e..8b5f371d33f 100644
--- a/chromium/skia/ext/image_operations.cc
+++ b/chromium/skia/ext/image_operations.cc
@@ -360,7 +360,6 @@ SkBitmap ImageOperations::Resize(const SkBitmap& source,
SkASSERT((ImageOperations::RESIZE_FIRST_ALGORITHM_METHOD <= method) &&
(method <= ImageOperations::RESIZE_LAST_ALGORITHM_METHOD));
- SkAutoLockPixels locker(source);
if (!source.readyToDraw() || source.colorType() != kN32_SkColorType)
return SkBitmap();
diff --git a/chromium/skia/ext/image_operations_unittest.cc b/chromium/skia/ext/image_operations_unittest.cc
index e88c5e28f29..a05dfeda9ab 100644
--- a/chromium/skia/ext/image_operations_unittest.cc
+++ b/chromium/skia/ext/image_operations_unittest.cc
@@ -162,7 +162,6 @@ void DrawCheckerToBitmap(int w, int h,
#if DEBUG_BITMAP_GENERATION
void SaveBitmapToPNG(const SkBitmap& bmp, const char* path) {
- SkAutoLockPixels lock(bmp);
std::vector<unsigned char> png;
gfx::PNGCodec::ColorFormat color_format = gfx::PNGCodec::FORMAT_RGBA;
if (!gfx::PNGCodec::Encode(
@@ -195,8 +194,6 @@ void CheckResampleToSame(skia::ImageOperations::ResizeMethod method) {
ASSERT_EQ(src_w, results.width());
ASSERT_EQ(src_h, results.height());
- SkAutoLockPixels src_lock(src);
- SkAutoLockPixels results_lock(results);
for (int y = 0; y < src_h; y++) {
for (int x = 0; x < src_w; x++) {
EXPECT_EQ(*src.getAddr32(x, y), *results.getAddr32(x, y));
@@ -261,8 +258,6 @@ void CheckResizeMethodShouldAverageGrid(
float max_observed_distance = 0.0f;
bool all_pixels_ok = true;
- SkAutoLockPixels dest_lock(dest);
-
for (size_t pixel_index = 0;
pixel_index < arraysize(tested_pixels);
++pixel_index) {
@@ -367,7 +362,6 @@ TEST(ImageOperations, Halve) {
ASSERT_EQ(src_h / 2, actual_results.height());
// Compute the expected values & compare.
- SkAutoLockPixels lock(actual_results);
for (int y = 0; y < actual_results.height(); y++) {
for (int x = 0; x < actual_results.width(); x++) {
// Note that those expressions take into account the "half-pixel"
@@ -421,8 +415,6 @@ TEST(ImageOperations, HalveSubset) {
// The computed subset and the corresponding subset of the original image
// should be the same.
- SkAutoLockPixels full_lock(full_results);
- SkAutoLockPixels subset_lock(subset_results);
for (int y = 0; y < subset_rect.height(); y++) {
for (int x = 0; x < subset_rect.width(); x++) {
ASSERT_EQ(
@@ -543,7 +535,6 @@ TEST(ImageOperations, ScaleUp) {
src,
skia::ImageOperations::RESIZE_LANCZOS3,
dst_w, dst_h);
- SkAutoLockPixels dst_lock(dst);
for (int dst_y = 0; dst_y < dst_h; ++dst_y) {
for (int dst_x = 0; dst_x < dst_w; ++dst_x) {
float dst_x_in_src = (dst_x + 0.5) * src_w / dst_w;
diff --git a/chromium/skia/ext/platform_canvas.cc b/chromium/skia/ext/platform_canvas.cc
index 288e391dc5e..d31f5f614b8 100644
--- a/chromium/skia/ext/platform_canvas.cc
+++ b/chromium/skia/ext/platform_canvas.cc
@@ -14,8 +14,9 @@ namespace skia {
SkBitmap ReadPixels(SkCanvas* canvas) {
SkBitmap bitmap;
- bitmap.setInfo(canvas->imageInfo());
- canvas->readPixels(&bitmap, 0, 0);
+ bitmap.allocPixels(canvas->imageInfo());
+ if (!canvas->readPixels(bitmap, 0, 0))
+ bitmap.reset();
return bitmap;
}
diff --git a/chromium/skia/ext/platform_canvas_unittest.cc b/chromium/skia/ext/platform_canvas_unittest.cc
index 1bd15a6bb90..8d7e5979fd9 100644
--- a/chromium/skia/ext/platform_canvas_unittest.cc
+++ b/chromium/skia/ext/platform_canvas_unittest.cc
@@ -58,7 +58,6 @@ bool VerifyRect(const SkCanvas& canvas,
uint32_t canvas_color, uint32_t rect_color,
int x, int y, int w, int h) {
const SkBitmap bitmap = skia::ReadPixels(const_cast<SkCanvas*>(&canvas));
- SkAutoLockPixels lock(bitmap);
for (int cur_y = 0; cur_y < bitmap.height(); cur_y++) {
for (int cur_x = 0; cur_x < bitmap.width(); cur_x++) {
diff --git a/chromium/skia/ext/skia_commit_hash.h b/chromium/skia/ext/skia_commit_hash.h
index 6223eda4e9e..06a72ae120d 100644
--- a/chromium/skia/ext/skia_commit_hash.h
+++ b/chromium/skia/ext/skia_commit_hash.h
@@ -3,6 +3,6 @@
#ifndef SKIA_EXT_SKIA_COMMIT_HASH_H_
#define SKIA_EXT_SKIA_COMMIT_HASH_H_
-#define SKIA_COMMIT_HASH "62ee4d0fc7b9bc20a225aaf3da676874f22d650a"
+#define SKIA_COMMIT_HASH "1a1dc0a9ca21ee9a4f79d5bbc2075f2c3e513ccd-"
#endif // SKIA_EXT_SKIA_COMMIT_HASH_H_
diff --git a/chromium/skia/ext/skia_encode_image.cc b/chromium/skia/ext/skia_encode_image.cc
deleted file mode 100644
index bb6820fcdf5..00000000000
--- a/chromium/skia/ext/skia_encode_image.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "skia/ext/skia_encode_image.h"
-
-#include "third_party/skia/include/core/SkImageEncoder.h"
-
-static skia::ImageEncoderFunction g_image_encoder = nullptr;
-
-void skia::SetImageEncoder(skia::ImageEncoderFunction image_encoder) {
- g_image_encoder = image_encoder;
-}
-
-bool SkEncodeImage(SkWStream* stream,
- const SkPixmap& pixmap,
- SkEncodedImageFormat format,
- int quality) {
- skia::ImageEncoderFunction encoder = g_image_encoder;
- return encoder && encoder(stream, pixmap, format, quality);
-}
diff --git a/chromium/skia/ext/skia_encode_image.h b/chromium/skia/ext/skia_encode_image.h
deleted file mode 100644
index 30e209fafcb..00000000000
--- a/chromium/skia/ext/skia_encode_image.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SKIA_EXT_SKIA_ENCODE_IMAGE_H
-#define SKIA_EXT_SKIA_ENCODE_IMAGE_H
-
-#include "third_party/skia/include/core/SkEncodedImageFormat.h"
-#include "third_party/skia/include/core/SkTypes.h"
-
-class SkPixmap;
-class SkWStream;
-
-namespace skia {
-
-using ImageEncoderFunction = bool (*)(SkWStream*,
- const SkPixmap&,
- SkEncodedImageFormat,
- int quality);
-
-SK_API void SetImageEncoder(ImageEncoderFunction);
-
-} // namespace skia
-
-#endif // SKIA_EXT_SKIA_ENCODE_IMAGE_H