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

Side by Side Diff: src/core/SkDevice.cpp

Issue 583773004: Revert of introduce Props to surface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkDeviceProperties.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkDevice.h" 8 #include "SkDevice.h"
9 #include "SkDeviceProperties.h" 9 #include "SkDeviceProperties.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
11 #include "SkMetaData.h" 11 #include "SkMetaData.h"
12 #include "SkPatchUtils.h" 12 #include "SkPatchUtils.h"
13 #include "SkShader.h" 13 #include "SkShader.h"
14 #include "SkTextBlob.h" 14 #include "SkTextBlob.h"
15 15
16 SkBaseDevice::SkBaseDevice() 16 SkBaseDevice::SkBaseDevice()
17 : fLeakyProperties(SkNEW_ARGS(SkDeviceProperties, (SkDeviceProperties::kLega cyLCD_InitType))) 17 : fLeakyProperties(SkNEW_ARGS(SkDeviceProperties, (SkDeviceProperties::MakeD efault())))
18 #ifdef SK_DEBUG 18 #ifdef SK_DEBUG
19 , fAttachedToCanvas(false) 19 , fAttachedToCanvas(false)
20 #endif 20 #endif
21 { 21 {
22 fOrigin.setZero(); 22 fOrigin.setZero();
23 fMetaData = NULL; 23 fMetaData = NULL;
24 } 24 }
25 25
26 SkBaseDevice::~SkBaseDevice() { 26 SkBaseDevice::~SkBaseDevice() {
27 SkDELETE(fLeakyProperties); 27 SkDELETE(fLeakyProperties);
(...skipping 22 matching lines...) Expand all
50 } 50 }
51 51
52 const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) { 52 const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) {
53 const SkBitmap& bitmap = this->onAccessBitmap(); 53 const SkBitmap& bitmap = this->onAccessBitmap();
54 if (changePixels) { 54 if (changePixels) {
55 bitmap.notifyPixelsChanged(); 55 bitmap.notifyPixelsChanged();
56 } 56 }
57 return bitmap; 57 return bitmap;
58 } 58 }
59 59
60 void SkBaseDevice::setPixelGeometry(SkPixelGeometry geo) { 60 SkSurface* SkBaseDevice::newSurface(const SkImageInfo&) { return NULL; }
61 fLeakyProperties->fPixelGeometry = geo;
62 }
63
64 SkSurface* SkBaseDevice::newSurface(const SkImageInfo&, const SkSurfaceProps&) { return NULL; }
65 61
66 const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; } 62 const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; }
67 63
68 void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, 64 void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer,
69 const SkRRect& inner, const SkPaint& paint) { 65 const SkRRect& inner, const SkPaint& paint) {
70 SkPath path; 66 SkPath path;
71 path.addRRect(outer); 67 path.addRRect(outer);
72 path.addRRect(inner); 68 path.addRRect(inner);
73 path.setFillType(SkPath::kEvenOdd_FillType); 69 path.setFillType(SkPath::kEvenOdd_FillType);
74 70
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 194
199 void SkBaseDevice::EXPERIMENTAL_optimize(const SkPicture* picture) { 195 void SkBaseDevice::EXPERIMENTAL_optimize(const SkPicture* picture) {
200 // The base class doesn't perform any analysis but derived classes may 196 // The base class doesn't perform any analysis but derived classes may
201 } 197 }
202 198
203 bool SkBaseDevice::EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const S kMatrix*, 199 bool SkBaseDevice::EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const S kMatrix*,
204 const SkPaint*) { 200 const SkPaint*) {
205 // The base class doesn't perform any accelerated picture rendering 201 // The base class doesn't perform any accelerated picture rendering
206 return false; 202 return false;
207 } 203 }
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkDeviceProperties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698