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

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

Issue 1397123002: Move functions from SkGr to SkGrPriv.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 9th time's a charm? Created 5 years, 2 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/gpu/GrContext.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 2012 Google Inc. 2 * Copyright 2012 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 "GrSurface.h" 8 #include "GrSurface.h"
9 #include "GrContext.h"
9 #include "GrSurfacePriv.h" 10 #include "GrSurfacePriv.h"
10 11
11 #include "SkBitmap.h" 12 #include "SkBitmap.h"
12 #include "SkGr.h" 13 #include "SkGrPriv.h"
13 #include "SkImageEncoder.h" 14 #include "SkImageEncoder.h"
14 #include <stdio.h> 15 #include <stdio.h>
15 16
16 size_t GrSurface::WorseCaseSize(const GrSurfaceDesc& desc) { 17 size_t GrSurface::WorseCaseSize(const GrSurfaceDesc& desc) {
17 size_t size; 18 size_t size;
18 19
19 bool isRenderTarget = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag); 20 bool isRenderTarget = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag);
20 if (isRenderTarget) { 21 if (isRenderTarget) {
21 // We own one color value for each MSAA sample. 22 // We own one color value for each MSAA sample.
22 int colorValuesPerPixel = SkTMax(1, desc.fSampleCnt); 23 int colorValuesPerPixel = SkTMax(1, desc.fSampleCnt);
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 203
203 void GrSurface::onRelease() { 204 void GrSurface::onRelease() {
204 this->invokeReleaseProc(); 205 this->invokeReleaseProc();
205 this->INHERITED::onRelease(); 206 this->INHERITED::onRelease();
206 } 207 }
207 208
208 void GrSurface::onAbandon() { 209 void GrSurface::onAbandon() {
209 this->invokeReleaseProc(); 210 this->invokeReleaseProc();
210 this->INHERITED::onAbandon(); 211 this->INHERITED::onAbandon();
211 } 212 }
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698