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

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

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 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/GrStencilAttachment.h ('k') | src/gpu/GrTargetCommands.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 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 "GrContext.h"
10 #include "GrSurfacePriv.h" 10 #include "GrSurfacePriv.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 int* left, int* top, int* width, int* height, 85 int* left, int* top, int* width, int* height,
86 const void** data, 86 const void** data,
87 size_t* rowBytes) { 87 size_t* rowBytes) {
88 return adjust_params<const void>(surfaceWidth, surfaceHeight, bpp, left, top , width, height, 88 return adjust_params<const void>(surfaceWidth, surfaceHeight, bpp, left, top , width, height,
89 data, rowBytes); 89 data, rowBytes);
90 } 90 }
91 91
92 92
93 ////////////////////////////////////////////////////////////////////////////// 93 //////////////////////////////////////////////////////////////////////////////
94 94
95 bool GrSurface::writePixels(int left, int top, int width, int height, 95 bool GrSurface::writePixels(GrDrawContext* dc, int left, int top, int width, int height,
96 GrPixelConfig config, const void* buffer, size_t row Bytes, 96 GrPixelConfig config, const void* buffer, size_t row Bytes,
97 uint32_t pixelOpsFlags) { 97 uint32_t pixelOpsFlags) {
98 // go through context so that all necessary flushing occurs 98 // go through context so that all necessary flushing occurs
99 GrContext* context = this->getContext(); 99 GrContext* context = this->getContext();
100 if (nullptr == context) { 100 if (nullptr == context) {
101 return false; 101 return false;
102 } 102 }
103 return context->writeSurfacePixels(this, left, top, width, height, config, b uffer, rowBytes, 103 return context->writeSurfacePixels(dc, this, left, top, width, height, confi g, buffer, rowBytes,
104 pixelOpsFlags); 104 pixelOpsFlags);
105 } 105 }
106 106
107 bool GrSurface::readPixels(int left, int top, int width, int height, 107 bool GrSurface::readPixels(int left, int top, int width, int height,
108 GrPixelConfig config, void* buffer, size_t rowBytes, 108 GrPixelConfig config, void* buffer, size_t rowBytes,
109 uint32_t pixelOpsFlags) { 109 uint32_t pixelOpsFlags) {
110 // go through context so that all necessary flushing occurs 110 // go through context so that all necessary flushing occurs
111 GrContext* context = this->getContext(); 111 GrContext* context = this->getContext();
112 if (nullptr == context) { 112 if (nullptr == context) {
113 return false; 113 return false;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 void GrSurface::onRelease() { 204 void GrSurface::onRelease() {
205 this->invokeReleaseProc(); 205 this->invokeReleaseProc();
206 this->INHERITED::onRelease(); 206 this->INHERITED::onRelease();
207 } 207 }
208 208
209 void GrSurface::onAbandon() { 209 void GrSurface::onAbandon() {
210 this->invokeReleaseProc(); 210 this->invokeReleaseProc();
211 this->INHERITED::onAbandon(); 211 this->INHERITED::onAbandon();
212 } 212 }
OLDNEW
« no previous file with comments | « src/gpu/GrStencilAttachment.h ('k') | src/gpu/GrTargetCommands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698