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

Side by Side Diff: src/gpu/GrPictureUtils.cpp

Issue 302253002: hide SkDevice::config() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 6 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 | « include/gpu/SkGpuDevice.h ('k') | src/gpu/SkGpuDevice.cpp » ('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 2014 Google Inc. 2 * Copyright 2014 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 "GrPictureUtils.h" 8 #include "GrPictureUtils.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 fEmptyBitmap.setInfo(SkImageInfo::MakeUnknown(fInfo.fSize.fWidth, fInfo. fSize.fHeight)); 44 fEmptyBitmap.setInfo(SkImageInfo::MakeUnknown(fInfo.fSize.fWidth, fInfo. fSize.fHeight));
45 fAccelData = accelData; 45 fAccelData = accelData;
46 fAlreadyDrawn = false; 46 fAlreadyDrawn = false;
47 } 47 }
48 48
49 virtual ~GrGatherDevice() { } 49 virtual ~GrGatherDevice() { }
50 50
51 virtual int width() const SK_OVERRIDE { return fInfo.fSize.width(); } 51 virtual int width() const SK_OVERRIDE { return fInfo.fSize.width(); }
52 virtual int height() const SK_OVERRIDE { return fInfo.fSize.height(); } 52 virtual int height() const SK_OVERRIDE { return fInfo.fSize.height(); }
53 virtual bool isOpaque() const SK_OVERRIDE { return false; } 53 virtual bool isOpaque() const SK_OVERRIDE { return false; }
54 #ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
54 virtual SkBitmap::Config config() const SK_OVERRIDE { 55 virtual SkBitmap::Config config() const SK_OVERRIDE {
55 return SkBitmap::kNo_Config; 56 return SkBitmap::kNo_Config;
56 } 57 }
58 #endif
57 virtual SkImageInfo imageInfo() const SK_OVERRIDE { 59 virtual SkImageInfo imageInfo() const SK_OVERRIDE {
58 return fEmptyBitmap.info(); 60 return fEmptyBitmap.info();
59 } 61 }
60 62
61 #ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG 63 #ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG
62 virtual void writePixels(const SkBitmap& bitmap, int x, int y, 64 virtual void writePixels(const SkBitmap& bitmap, int x, int y,
63 SkCanvas::Config8888 config8888) SK_OVERRIDE { 65 SkCanvas::Config8888 config8888) SK_OVERRIDE {
64 NotSupported(); 66 NotSupported();
65 } 67 }
66 #endif 68 #endif
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 void GatherGPUInfo(SkPicture* pict, GPUAccelData* accelData) { 277 void GatherGPUInfo(SkPicture* pict, GPUAccelData* accelData) {
276 if (0 == pict->width() || 0 == pict->height()) { 278 if (0 == pict->width() || 0 == pict->height()) {
277 return ; 279 return ;
278 } 280 }
279 281
280 GrGatherDevice device(pict->width(), pict->height(), pict, accelData, 0); 282 GrGatherDevice device(pict->width(), pict->height(), pict, accelData, 0);
281 GrGatherCanvas canvas(&device, pict); 283 GrGatherCanvas canvas(&device, pict);
282 284
283 canvas.gather(); 285 canvas.gather();
284 } 286 }
OLDNEW
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698