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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 622663002: GrContext::copyTexture->GrContext::copySurface. Add a flush writes pixel ops flag. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 fCurContext->flush(); 291 fCurContext->flush();
292 292
293 if (!IsGpuDeviceType(dType)) { 293 if (!IsGpuDeviceType(dType)) {
294 // need to send the raster bits to the (gpu) window 294 // need to send the raster bits to the (gpu) window
295 fCurContext->setRenderTarget(fCurRenderTarget); 295 fCurContext->setRenderTarget(fCurRenderTarget);
296 const SkBitmap& bm = win->getBitmap(); 296 const SkBitmap& bm = win->getBitmap();
297 fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(), 297 fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(),
298 SkImageInfo2GrPixelConfig(bm.colorT ype(), 298 SkImageInfo2GrPixelConfig(bm.colorT ype(),
299 bm.alphaT ype()), 299 bm.alphaT ype()),
300 bm.getPixels(), 300 bm.getPixels(),
301 bm.rowBytes()); 301 bm.rowBytes(),
302 302 GrContext::kFlushWrites_PixelOp);
303 // extra flush call, until Brian can figure out what's going on.
304 fCurContext->flush();
305 } 303 }
306 } 304 }
307 #endif 305 #endif
308 306
309 win->present(); 307 win->present();
310 } 308 }
311 309
312 virtual void windowSizeChanged(SampleWindow* win) { 310 virtual void windowSizeChanged(SampleWindow* win) {
313 #if SK_SUPPORT_GPU 311 #if SK_SUPPORT_GPU
314 if (fCurContext) { 312 if (fCurContext) {
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 setenv("ANDROID_ROOT", "/android/device/data", 0); 2416 setenv("ANDROID_ROOT", "/android/device/data", 0);
2419 #endif 2417 #endif
2420 SkGraphics::Init(); 2418 SkGraphics::Init();
2421 SkEvent::Init(); 2419 SkEvent::Init();
2422 } 2420 }
2423 2421
2424 void application_term() { 2422 void application_term() {
2425 SkEvent::Term(); 2423 SkEvent::Term();
2426 SkGraphics::Term(); 2424 SkGraphics::Term();
2427 } 2425 }
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