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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 23641008: Baby step in making SkGpuDevice no longer derive from SkBitmapDevice (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleaned up Created 7 years, 3 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 | « include/gpu/SkGpuDevice.h ('k') | no next file » | 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 11179)
+++ src/gpu/SkGpuDevice.cpp (working copy)
@@ -569,6 +569,23 @@
}
///////////////////////////////////////////////////////////////////////////////
+void SkGpuDevice::getGlobalBounds(SkIRect* bounds) const {
+ if (NULL != bounds) {
+ const SkIPoint& origin = this->getOrigin();
+ bounds->setXYWH(origin.x(), origin.y(),
+ this->width(), this->height());
+ }
+}
+
+SkBitmap::Config SkGpuDevice::config() const {
+ if (NULL == fRenderTarget) {
+ return SkBitmap::kNo_Config;
+ }
+
+ bool isOpaque;
+ return grConfig2skConfig(fRenderTarget->config(), &isOpaque);
+}
+
void SkGpuDevice::clear(SkColor color) {
SkIRect rect = SkIRect::MakeWH(this->width(), this->height());
fContext->clear(&rect, SkColor2GrColor(color), fRenderTarget);
@@ -1554,7 +1571,7 @@
// drawDevice is defined to be in device coords.
CHECK_SHOULD_DRAW(draw, true);
- GrRenderTarget* devRT = device->accessRenderTarget();
+ GrRenderTarget* devRT = dev->accessRenderTarget();
GrTexture* devTex;
if (NULL == (devTex = devRT->asTexture())) {
return;
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698