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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 1789663002: sRGB support in Ganesh. Several pieces: (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Squelch assert when blurring sRGB Created 4 years, 9 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/SkGr.h ('k') | src/core/SkImageCacherator.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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 if (fCurContext) { 303 if (fCurContext) {
304 // in case we have queued drawing calls 304 // in case we have queued drawing calls
305 fCurContext->flush(); 305 fCurContext->flush();
306 306
307 if (!IsGpuDeviceType(dType)) { 307 if (!IsGpuDeviceType(dType)) {
308 // need to send the raster bits to the (gpu) window 308 // need to send the raster bits to the (gpu) window
309 const SkBitmap& bm = win->getBitmap(); 309 const SkBitmap& bm = win->getBitmap();
310 fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(), 310 fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(),
311 SkImageInfo2GrPixelConfig(bm.colorT ype(), 311 SkImageInfo2GrPixelConfig(bm.colorT ype(),
312 bm.alphaT ype(), 312 bm.alphaT ype(),
313 bm.profil eType()), 313 bm.profil eType(),
314 *fCurCont ext->caps()),
314 bm.getPixels(), 315 bm.getPixels(),
315 bm.rowBytes(), 316 bm.rowBytes(),
316 GrContext::kFlushWrites_PixelOp); 317 GrContext::kFlushWrites_PixelOp);
317 } 318 }
318 } 319 }
319 #endif 320 #endif
320 321
321 win->present(); 322 win->present();
322 } 323 }
323 324
(...skipping 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after
2329 #ifdef SK_BUILD_FOR_MAC 2330 #ifdef SK_BUILD_FOR_MAC
2330 setenv("ANDROID_ROOT", "/android/device/data", 0); 2331 setenv("ANDROID_ROOT", "/android/device/data", 0);
2331 #endif 2332 #endif
2332 SkGraphics::Init(); 2333 SkGraphics::Init();
2333 SkEvent::Init(); 2334 SkEvent::Init();
2334 } 2335 }
2335 2336
2336 void application_term() { 2337 void application_term() {
2337 SkEvent::Term(); 2338 SkEvent::Term();
2338 } 2339 }
OLDNEW
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/core/SkImageCacherator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698