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

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

Issue 17269003: Change undefined SkGpuRenderTarget and SkGpuTexture forward declares to GrRenderTarget and GrTextur… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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/gpu/SkGpuDevice.cpp ('k') | src/image/SkSurface_Gpu.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 if (fUnlock) { 121 if (fUnlock) {
122 GrContext* context = fSurface->getContext(); 122 GrContext* context = fSurface->getContext();
123 GrTexture* texture = fSurface->asTexture(); 123 GrTexture* texture = fSurface->asTexture();
124 if (NULL != context && NULL != texture) { 124 if (NULL != context && NULL != texture) {
125 context->unlockScratchTexture(texture); 125 context->unlockScratchTexture(texture);
126 } 126 }
127 } 127 }
128 GrSafeUnref(fSurface); 128 GrSafeUnref(fSurface);
129 } 129 }
130 130
131 SkGpuTexture* SkGrPixelRef::getTexture() { 131 GrTexture* SkGrPixelRef::getTexture() {
132 if (NULL != fSurface) { 132 if (NULL != fSurface) {
133 return (SkGpuTexture*) fSurface->asTexture(); 133 return fSurface->asTexture();
134 } 134 }
135 return NULL; 135 return NULL;
136 } 136 }
137 137
138 SkPixelRef* SkGrPixelRef::deepCopy(SkBitmap::Config dstConfig, const SkIRect* su bset) { 138 SkPixelRef* SkGrPixelRef::deepCopy(SkBitmap::Config dstConfig, const SkIRect* su bset) {
139 if (NULL == fSurface) { 139 if (NULL == fSurface) {
140 return NULL; 140 return NULL;
141 } 141 }
142 142
143 // Note that when copying a render-target-backed pixel ref, we 143 // Note that when copying a render-target-backed pixel ref, we
(...skipping 26 matching lines...) Expand all
170 if (!dst->allocPixels()) { 170 if (!dst->allocPixels()) {
171 SkDebugf("SkGrPixelRef::onReadPixels failed to alloc bitmap for result!\ n"); 171 SkDebugf("SkGrPixelRef::onReadPixels failed to alloc bitmap for result!\ n");
172 return false; 172 return false;
173 } 173 }
174 SkAutoLockPixels al(*dst); 174 SkAutoLockPixels al(*dst);
175 void* buffer = dst->getPixels(); 175 void* buffer = dst->getPixels();
176 return fSurface->readPixels(left, top, width, height, 176 return fSurface->readPixels(left, top, width, height,
177 kSkia8888_GrPixelConfig, 177 kSkia8888_GrPixelConfig,
178 buffer, dst->rowBytes()); 178 buffer, dst->rowBytes());
179 } 179 }
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698