summaryrefslogtreecommitdiffstats
path: root/cc/output
diff options
context:
space:
mode:
authorrobertphillips@google.com <robertphillips@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-26 18:37:29 +0000
committerrobertphillips@google.com <robertphillips@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-26 18:37:29 +0000
commit598e4f866fb1540d4d5e4351694bb3c9b0a20a1b (patch)
treedf1a98aa62ccff7ffacacfa4c961d2ee74e6bf2f /cc/output
parent93773d08322990032231aa26c4eba4f02014de99 (diff)
downloadchromium_src-598e4f866fb1540d4d5e4351694bb3c9b0a20a1b.zip
chromium_src-598e4f866fb1540d4d5e4351694bb3c9b0a20a1b.tar.gz
chromium_src-598e4f866fb1540d4d5e4351694bb3c9b0a20a1b.tar.bz2
Skia is going to Split the SkDevice class into SkBaseDevice and SkBitmapDevice. Right now Skia has typedefs redirecting SkBaseDevice and SkBitmapDevice to SkDevice. This CL begins the Chromium-side renaming process in preparation for the real change (https://codereview.chromium.org/22978012/)
BUG=278148 Review URL: https://chromiumcodereview.appspot.com/22796028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219568 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output')
-rw-r--r--cc/output/gl_renderer.cc4
-rw-r--r--cc/output/software_output_device.cc4
-rw-r--r--cc/output/software_output_device.h5
-rw-r--r--cc/output/software_renderer.cc6
4 files changed, 10 insertions, 9 deletions
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index c9b6c58..63d8ea8 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -1705,7 +1705,7 @@ void GLRenderer::DrawPictureQuad(const DrawingFrame* frame,
ResourceProvider::TextureUsageAny);
}
- SkDevice device(on_demand_tile_raster_bitmap_);
+ SkBitmapDevice device(on_demand_tile_raster_bitmap_);
SkCanvas canvas(&device);
quad->picture_pile->RasterToBitmap(&canvas, quad->content_rect,
@@ -3114,7 +3114,7 @@ void GLRenderer::ReinitializeGrCanvas() {
skia::RefPtr<GrSurface> surface(
skia::AdoptRef(gr_context_->wrapBackendRenderTarget(desc)));
- skia::RefPtr<SkDevice> device(
+ skia::RefPtr<SkBaseDevice> device(
skia::AdoptRef(SkGpuDevice::Create(surface.get())));
sk_canvas_ = skia::AdoptRef(new SkCanvas(device.get()));
}
diff --git a/cc/output/software_output_device.cc b/cc/output/software_output_device.cc
index fc77eb4..03f977e 100644
--- a/cc/output/software_output_device.cc
+++ b/cc/output/software_output_device.cc
@@ -6,8 +6,8 @@
#include "base/logging.h"
#include "cc/output/software_frame_data.h"
+#include "third_party/skia/include/core/SkBitmapDevice.h"
#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkDevice.h"
#include "ui/gfx/skia_util.h"
namespace cc {
@@ -21,7 +21,7 @@ void SoftwareOutputDevice::Resize(gfx::Size viewport_size) {
return;
viewport_size_ = viewport_size;
- device_ = skia::AdoptRef(new SkDevice(SkBitmap::kARGB_8888_Config,
+ device_ = skia::AdoptRef(new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
viewport_size.width(), viewport_size.height(), true));
canvas_ = skia::AdoptRef(new SkCanvas(device_.get()));
}
diff --git a/cc/output/software_output_device.h b/cc/output/software_output_device.h
index c1a97dcb..788673e 100644
--- a/cc/output/software_output_device.h
+++ b/cc/output/software_output_device.h
@@ -8,12 +8,13 @@
#include "base/basictypes.h"
#include "cc/base/cc_export.h"
#include "skia/ext/refptr.h"
+// TODO(robertphillips): change this to "class SkBaseDevice;"
+#include "third_party/skia/include/core/SkDevice.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "ui/gfx/vector2d.h"
class SkBitmap;
-class SkDevice;
class SkCanvas;
namespace cc {
@@ -46,7 +47,7 @@ class CC_EXPORT SoftwareOutputDevice {
protected:
gfx::Size viewport_size_;
gfx::Rect damage_rect_;
- skia::RefPtr<SkDevice> device_;
+ skia::RefPtr<SkBaseDevice> device_;
skia::RefPtr<SkCanvas> canvas_;
private:
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index b62f5a0..ed5c18b 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -19,9 +19,9 @@
#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/texture_draw_quad.h"
#include "cc/quads/tile_draw_quad.h"
+#include "third_party/skia/include/core/SkBitmapDevice.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColor.h"
-#include "third_party/skia/include/core/SkDevice.h"
#include "third_party/skia/include/core/SkMatrix.h"
#include "third_party/skia/include/core/SkShader.h"
#include "third_party/skia/include/effects/SkLayerRasterizer.h"
@@ -128,7 +128,7 @@ void SoftwareRenderer::EnsureScissorTestDisabled() {
// clipRect on the current SkCanvas. This is done by setting clipRect to
// the viewport's dimensions.
is_scissor_enabled_ = false;
- SkDevice* device = current_canvas_->getDevice();
+ SkBaseDevice* device = current_canvas_->getDevice();
SetClipRect(gfx::Rect(device->width(), device->height()));
}
@@ -318,7 +318,7 @@ void SoftwareRenderer::DrawPictureQuad(const DrawingFrame* frame,
quad->texture_size.width(),
quad->texture_size.height());
temp_bitmap.allocPixels();
- SkDevice temp_device(temp_bitmap);
+ SkBitmapDevice temp_device(temp_bitmap);
SkCanvas temp_canvas(&temp_device);
quad->picture_pile->RasterToBitmap(