aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-29 11:54:56 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-29 11:54:56 +0000
commit1f2f338e23789f3eef168dcbd8171a28820ba6c1 (patch)
treecfa6c68aca1dbad85f6ae0d3e1e616d9dac1369b /bench
parent3e8466a1520343e2e7d280d9d1f39b2bd048fbb9 (diff)
Split SkDevice into SkBaseDevice and SkBitmapDevice
Diffstat (limited to 'bench')
-rw-r--r--bench/BlurImageFilterBench.cpp4
-rw-r--r--bench/DeferredCanvasBench.cpp2
-rw-r--r--bench/DisplacementBench.cpp6
-rw-r--r--bench/MagnifierBench.cpp4
-rw-r--r--bench/MergeBench.cpp6
-rw-r--r--bench/benchmain.cpp10
6 files changed, 16 insertions, 16 deletions
diff --git a/bench/BlurImageFilterBench.cpp b/bench/BlurImageFilterBench.cpp
index 1666f57b93..10320e82c7 100644
--- a/bench/BlurImageFilterBench.cpp
+++ b/bench/BlurImageFilterBench.cpp
@@ -6,9 +6,9 @@
*/
#include "SkBenchmark.h"
+#include "SkBitmapDevice.h"
#include "SkBlurImageFilter.h"
#include "SkCanvas.h"
-#include "SkDevice.h"
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkShader.h"
@@ -53,7 +53,7 @@ private:
const int h = fIsSmall ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE;
fCheckerboard.setConfig(SkBitmap::kARGB_8888_Config, w, h);
fCheckerboard.allocPixels();
- SkDevice device(fCheckerboard);
+ SkBitmapDevice device(fCheckerboard);
SkCanvas canvas(&device);
canvas.clear(0x00000000);
SkPaint darkPaint;
diff --git a/bench/DeferredCanvasBench.cpp b/bench/DeferredCanvasBench.cpp
index 9e7e723821..e14bb24cf8 100644
--- a/bench/DeferredCanvasBench.cpp
+++ b/bench/DeferredCanvasBench.cpp
@@ -26,7 +26,7 @@ protected:
}
virtual void onDraw(SkCanvas* canvas) {
- SkDevice *device = canvas->getDevice()->createCompatibleDevice(
+ SkBaseDevice *device = canvas->getDevice()->createCompatibleDevice(
SkBitmap::kARGB_8888_Config, CANVAS_WIDTH, CANVAS_HEIGHT, false);
SkAutoTUnref<SkDeferredCanvas> deferredCanvas(SkDeferredCanvas::Create(device));
diff --git a/bench/DisplacementBench.cpp b/bench/DisplacementBench.cpp
index 5adec1f706..e498a1bc63 100644
--- a/bench/DisplacementBench.cpp
+++ b/bench/DisplacementBench.cpp
@@ -5,9 +5,9 @@
* found in the LICENSE file.
*/
#include "SkBenchmark.h"
+#include "SkBitmapDevice.h"
#include "SkBitmapSource.h"
#include "SkCanvas.h"
-#include "SkDevice.h"
#include "SkDisplacementMapEffect.h"
#define FILTER_WIDTH_SMALL 32
@@ -35,7 +35,7 @@ protected:
const int h = isSmall() ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE;
fBitmap.setConfig(SkBitmap::kARGB_8888_Config, w, h);
fBitmap.allocPixels();
- SkDevice device(fBitmap);
+ SkBitmapDevice device(fBitmap);
SkCanvas canvas(&device);
canvas.clear(0x00000000);
SkPaint paint;
@@ -51,7 +51,7 @@ protected:
const int h = isSmall() ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE;
fCheckerboard.setConfig(SkBitmap::kARGB_8888_Config, w, h);
fCheckerboard.allocPixels();
- SkDevice device(fCheckerboard);
+ SkBitmapDevice device(fCheckerboard);
SkCanvas canvas(&device);
canvas.clear(0x00000000);
SkPaint darkPaint;
diff --git a/bench/MagnifierBench.cpp b/bench/MagnifierBench.cpp
index 969323a791..2e937f358b 100644
--- a/bench/MagnifierBench.cpp
+++ b/bench/MagnifierBench.cpp
@@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
#include "SkBenchmark.h"
+#include "SkBitmapDevice.h"
#include "SkCanvas.h"
-#include "SkDevice.h"
#include "SkMagnifierImageFilter.h"
#include "SkRandom.h"
@@ -52,7 +52,7 @@ private:
const int h = fIsSmall ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE;
fCheckerboard.setConfig(SkBitmap::kARGB_8888_Config, w, h);
fCheckerboard.allocPixels();
- SkDevice device(fCheckerboard);
+ SkBitmapDevice device(fCheckerboard);
SkCanvas canvas(&device);
canvas.clear(0x00000000);
SkPaint darkPaint;
diff --git a/bench/MergeBench.cpp b/bench/MergeBench.cpp
index 3639c954a2..992507d9b5 100644
--- a/bench/MergeBench.cpp
+++ b/bench/MergeBench.cpp
@@ -5,9 +5,9 @@
* found in the LICENSE file.
*/
#include "SkBenchmark.h"
+#include "SkBitmapDevice.h"
#include "SkBitmapSource.h"
#include "SkCanvas.h"
-#include "SkDevice.h"
#include "SkMergeImageFilter.h"
#define FILTER_WIDTH_SMALL SkIntToScalar(32)
@@ -53,7 +53,7 @@ private:
void make_bitmap() {
fBitmap.setConfig(SkBitmap::kARGB_8888_Config, 80, 80);
fBitmap.allocPixels();
- SkDevice device(fBitmap);
+ SkBitmapDevice device(fBitmap);
SkCanvas canvas(&device);
canvas.clear(0x00000000);
SkPaint paint;
@@ -67,7 +67,7 @@ private:
void make_checkerboard() {
fCheckerboard.setConfig(SkBitmap::kARGB_8888_Config, 80, 80);
fCheckerboard.allocPixels();
- SkDevice device(fCheckerboard);
+ SkBitmapDevice device(fCheckerboard);
SkCanvas canvas(&device);
canvas.clear(0x00000000);
SkPaint darkPaint;
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index cec21df7ae..99e9f6cf86 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -199,9 +199,9 @@ enum Backend {
kPDF_Backend,
};
-static SkDevice* make_device(SkBitmap::Config config, const SkIPoint& size,
- Backend backend, int sampleCount, GrContext* context) {
- SkDevice* device = NULL;
+static SkBaseDevice* make_device(SkBitmap::Config config, const SkIPoint& size,
+ Backend backend, int sampleCount, GrContext* context) {
+ SkBaseDevice* device = NULL;
SkBitmap bitmap;
bitmap.setConfig(config, size.fX, size.fY);
@@ -209,7 +209,7 @@ static SkDevice* make_device(SkBitmap::Config config, const SkIPoint& size,
case kRaster_Backend:
bitmap.allocPixels();
erase(bitmap);
- device = SkNEW_ARGS(SkDevice, (bitmap));
+ device = SkNEW_ARGS(SkBitmapDevice, (bitmap));
break;
#if SK_SUPPORT_GPU
case kGPU_Backend: {
@@ -780,7 +780,7 @@ int tool_main(int argc, char** argv) {
glContext = gContextFactory.getGLContext(gConfigs[configIndex].fContextType);
}
#endif
- SkDevice* device = NULL;
+ SkBaseDevice* device = NULL;
SkCanvas* canvas = NULL;
SkPicture pictureRecordFrom;
SkPicture pictureRecordTo;