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/pipe/SkGPipeWrite.cpp

Issue 169023002: still trying to kill setDevice: rename to setRootDevice (better name) and make private (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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/image/SkSurface_Gpu.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/SkGPipeWrite.cpp
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index 54e3bead69d81dfc54c7c3e3acdae92640f4830d..adc9cc3a4b90fe99dc61e680e18d3495ba2fa29b 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -425,11 +425,13 @@ int SkGPipeCanvas::flattenToIndex(SkFlattenable* obj, PaintFlats paintflat) {
SkGPipeCanvas::SkGPipeCanvas(SkGPipeController* controller,
SkWriter32* writer, uint32_t flags,
uint32_t width, uint32_t height)
-: fFactorySet(isCrossProcess(flags) ? SkNEW(SkNamedFactorySet) : NULL)
-, fWriter(*writer)
-, fFlags(flags)
-, fFlattenableHeap(FLATTENABLES_TO_KEEP, fFactorySet, isCrossProcess(flags))
-, fFlatDictionary(&fFlattenableHeap) {
+ : SkCanvas(width, height)
scroggo 2014/02/17 14:40:43 nit: INHERITED.
+ , fFactorySet(isCrossProcess(flags) ? SkNEW(SkNamedFactorySet) : NULL)
+ , fWriter(*writer)
+ , fFlags(flags)
+ , fFlattenableHeap(FLATTENABLES_TO_KEEP, fFactorySet, isCrossProcess(flags))
+ , fFlatDictionary(&fFlattenableHeap)
+{
fController = controller;
fDone = false;
fBlockSize = 0; // need first block from controller
@@ -437,13 +439,6 @@ SkGPipeCanvas::SkGPipeCanvas(SkGPipeController* controller,
fFirstSaveLayerStackLevel = kNoSaveLayer;
sk_bzero(fCurrFlatIndex, sizeof(fCurrFlatIndex));
- // we need a device to limit our clip
- // We don't allocate pixels for the bitmap
- SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
- SkBaseDevice* device = SkNEW_ARGS(SkBitmapDevice, (bitmap));
- this->setDevice(device)->unref();
-
// Tell the reader the appropriate flags to use.
if (this->needOpBytes()) {
this->writeOp(kReportFlags_DrawOp, fFlags, 0);
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698