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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 621073002: Revert of GrContext::copyTexture->GrContext::copySurface. Add a flush writes pixel ops flag. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « include/gpu/GrSurface.h ('k') | src/gpu/GrContext.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 2011 Google Inc. 2 * Copyright 2011 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 "SampleApp.h" 8 #include "SampleApp.h"
9 9
10 #include "OverView.h" 10 #include "OverView.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 fCurContext->flush(); 290 fCurContext->flush();
291 291
292 if (!IsGpuDeviceType(dType)) { 292 if (!IsGpuDeviceType(dType)) {
293 // need to send the raster bits to the (gpu) window 293 // need to send the raster bits to the (gpu) window
294 fCurContext->setRenderTarget(fCurRenderTarget); 294 fCurContext->setRenderTarget(fCurRenderTarget);
295 const SkBitmap& bm = win->getBitmap(); 295 const SkBitmap& bm = win->getBitmap();
296 fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(), 296 fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(),
297 SkImageInfo2GrPixelConfig(bm.colorT ype(), 297 SkImageInfo2GrPixelConfig(bm.colorT ype(),
298 bm.alphaT ype()), 298 bm.alphaT ype()),
299 bm.getPixels(), 299 bm.getPixels(),
300 bm.rowBytes(), 300 bm.rowBytes());
301 GrContext::kFlushWrites_PixelOp);
302 } 301 }
303 } 302 }
304 #endif 303 #endif
305 304
306 win->present(); 305 win->present();
307 } 306 }
308 307
309 virtual void windowSizeChanged(SampleWindow* win) { 308 virtual void windowSizeChanged(SampleWindow* win) {
310 #if SK_SUPPORT_GPU 309 #if SK_SUPPORT_GPU
311 if (fCurContext) { 310 if (fCurContext) {
(...skipping 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after
2400 setenv("ANDROID_ROOT", "/android/device/data", 0); 2399 setenv("ANDROID_ROOT", "/android/device/data", 0);
2401 #endif 2400 #endif
2402 SkGraphics::Init(); 2401 SkGraphics::Init();
2403 SkEvent::Init(); 2402 SkEvent::Init();
2404 } 2403 }
2405 2404
2406 void application_term() { 2405 void application_term() {
2407 SkEvent::Term(); 2406 SkEvent::Term();
2408 SkGraphics::Term(); 2407 SkGraphics::Term();
2409 } 2408 }
OLDNEW
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698