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

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

Issue 301283003: Revert "Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add guard for android 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('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 23 matching lines...) Expand all
34 fPicture = picture; 34 fPicture = picture;
35 fSaveLayerDepth = saveLayerDepth; 35 fSaveLayerDepth = saveLayerDepth;
36 fInfo.fValid = true; 36 fInfo.fValid = true;
37 fInfo.fSize.set(width, height); 37 fInfo.fSize.set(width, height);
38 fInfo.fPaint = NULL; 38 fInfo.fPaint = NULL;
39 fInfo.fSaveLayerOpID = fPicture->EXPERIMENTAL_curOpID(); 39 fInfo.fSaveLayerOpID = fPicture->EXPERIMENTAL_curOpID();
40 fInfo.fRestoreOpID = 0; 40 fInfo.fRestoreOpID = 0;
41 fInfo.fHasNestedLayers = false; 41 fInfo.fHasNestedLayers = false;
42 fInfo.fIsNested = (2 == fSaveLayerDepth); 42 fInfo.fIsNested = (2 == fSaveLayerDepth);
43 43
44 fEmptyBitmap.setConfig(SkImageInfo::Make(fInfo.fSize.fWidth, 44 fEmptyBitmap.setInfo(SkImageInfo::MakeUnknown(fInfo.fSize.fWidth, fInfo. fSize.fHeight));
45 fInfo.fSize.fHeight,
46 kUnknown_SkColorType,
47 kIgnore_SkAlphaType));
48 fAccelData = accelData; 45 fAccelData = accelData;
49 fAlreadyDrawn = false; 46 fAlreadyDrawn = false;
50 } 47 }
51 48
52 virtual ~GrGatherDevice() { } 49 virtual ~GrGatherDevice() { }
53 50
54 virtual int width() const SK_OVERRIDE { return fInfo.fSize.width(); } 51 virtual int width() const SK_OVERRIDE { return fInfo.fSize.width(); }
55 virtual int height() const SK_OVERRIDE { return fInfo.fSize.height(); } 52 virtual int height() const SK_OVERRIDE { return fInfo.fSize.height(); }
56 virtual bool isOpaque() const SK_OVERRIDE { return false; } 53 virtual bool isOpaque() const SK_OVERRIDE { return false; }
57 virtual SkBitmap::Config config() const SK_OVERRIDE { 54 virtual SkBitmap::Config config() const SK_OVERRIDE {
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 void GatherGPUInfo(SkPicture* pict, GPUAccelData* accelData) { 275 void GatherGPUInfo(SkPicture* pict, GPUAccelData* accelData) {
279 if (0 == pict->width() || 0 == pict->height()) { 276 if (0 == pict->width() || 0 == pict->height()) {
280 return ; 277 return ;
281 } 278 }
282 279
283 GrGatherDevice device(pict->width(), pict->height(), pict, accelData, 0); 280 GrGatherDevice device(pict->width(), pict->height(), pict, accelData, 0);
284 GrGatherCanvas canvas(&device, pict); 281 GrGatherCanvas canvas(&device, pict);
285 282
286 canvas.gather(); 283 canvas.gather();
287 } 284 }
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698