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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 22978012: Split SkDevice into SkBaseDevice and SkBitmapDevice (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updating to ToT (10994) Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkTestImageFilters.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
===================================================================
--- src/gpu/SkGpuDevice.cpp (revision 10994)
+++ src/gpu/SkGpuDevice.cpp (working copy)
@@ -161,12 +161,12 @@
}
SkGpuDevice::SkGpuDevice(GrContext* context, GrTexture* texture)
-: SkDevice(make_bitmap(context, texture->asRenderTarget())) {
+ : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) {
this->initFromRenderTarget(context, texture->asRenderTarget(), false);
}
SkGpuDevice::SkGpuDevice(GrContext* context, GrRenderTarget* renderTarget)
-: SkDevice(make_bitmap(context, renderTarget)) {
+ : SkBitmapDevice(make_bitmap(context, renderTarget)) {
this->initFromRenderTarget(context, renderTarget, false);
}
@@ -203,7 +203,7 @@
int width,
int height,
int sampleCount)
- : SkDevice(config, width, height, false /*isOpaque*/) {
+ : SkBitmapDevice(config, width, height, false /*isOpaque*/) {
fDrawProcs = NULL;
@@ -1436,7 +1436,7 @@
fContext->drawRectToRect(grPaint, dstRect, paintRect, &m);
}
-static bool filter_texture(SkDevice* device, GrContext* context,
+static bool filter_texture(SkBaseDevice* device, GrContext* context,
GrTexture* texture, SkImageFilter* filter,
int w, int h, const SkMatrix& ctm, SkBitmap* result,
SkIPoint* offset) {
@@ -1537,7 +1537,7 @@
this->drawBitmapCommon(draw, bitmap, &tmpSrc, matrix, paint, flags);
}
-void SkGpuDevice::drawDevice(const SkDraw& draw, SkDevice* device,
+void SkGpuDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device,
int x, int y, const SkPaint& paint) {
// clear of the source device must occur before CHECK_SHOULD_DRAW
SkGpuDevice* dev = static_cast<SkGpuDevice*>(device);
@@ -1822,10 +1822,10 @@
///////////////////////////////////////////////////////////////////////////////
-SkDevice* SkGpuDevice::onCreateCompatibleDevice(SkBitmap::Config config,
- int width, int height,
- bool isOpaque,
- Usage usage) {
+SkBaseDevice* SkGpuDevice::onCreateCompatibleDevice(SkBitmap::Config config,
+ int width, int height,
+ bool isOpaque,
+ Usage usage) {
GrTextureDesc desc;
desc.fConfig = fRenderTarget->config();
desc.fFlags = kRenderTarget_GrTextureFlagBit;
@@ -1858,7 +1858,7 @@
SkGpuDevice::SkGpuDevice(GrContext* context,
GrTexture* texture,
bool needClear)
- : SkDevice(make_bitmap(context, texture->asRenderTarget())) {
+ : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) {
SkASSERT(texture && texture->asRenderTarget());
// This constructor is called from onCreateCompatibleDevice. It has locked the RT in the texture
« no previous file with comments | « src/effects/SkTestImageFilters.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698