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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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/views/SkView.h ('k') | samplecode/SampleChart.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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 SkSafeUnref(fCurRenderTarget); 267 SkSafeUnref(fCurRenderTarget);
268 fCurRenderTarget = NULL; 268 fCurRenderTarget = NULL;
269 #endif 269 #endif
270 win->detach(); 270 win->detach();
271 fBackend = kNone_BackEndType; 271 fBackend = kNone_BackEndType;
272 } 272 }
273 273
274 virtual SkCanvas* createCanvas(SampleWindow::DeviceType dType, 274 virtual SkCanvas* createCanvas(SampleWindow::DeviceType dType,
275 SampleWindow* win) { 275 SampleWindow* win) {
276 #if SK_SUPPORT_GPU 276 #if SK_SUPPORT_GPU
277 if (IsGpuDeviceType(dType) && NULL != fCurContext) { 277 if (IsGpuDeviceType(dType) && fCurContext) {
278 SkAutoTUnref<SkBaseDevice> device(SkGpuDevice::Create(fCurRenderTarg et)); 278 SkAutoTUnref<SkBaseDevice> device(SkGpuDevice::Create(fCurRenderTarg et));
279 return new SkCanvas(device); 279 return new SkCanvas(device);
280 } else 280 } else
281 #endif 281 #endif
282 { 282 {
283 return NULL; 283 return NULL;
284 } 284 }
285 } 285 }
286 286
287 virtual void publishCanvas(SampleWindow::DeviceType dType, 287 virtual void publishCanvas(SampleWindow::DeviceType dType,
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 break; 2046 break;
2047 2047
2048 default: 2048 default:
2049 break; 2049 break;
2050 } 2050 }
2051 title.prepend("! "); 2051 title.prepend("! ");
2052 } 2052 }
2053 2053
2054 #if SK_SUPPORT_GPU 2054 #if SK_SUPPORT_GPU
2055 if (IsGpuDeviceType(fDeviceType) && 2055 if (IsGpuDeviceType(fDeviceType) &&
2056 NULL != fDevManager && 2056 fDevManager &&
2057 fDevManager->getGrRenderTarget() && 2057 fDevManager->getGrRenderTarget() &&
2058 fDevManager->getGrRenderTarget()->numSamples() > 0) { 2058 fDevManager->getGrRenderTarget()->numSamples() > 0) {
2059 title.appendf(" [MSAA: %d]", 2059 title.appendf(" [MSAA: %d]",
2060 fDevManager->getGrRenderTarget()->numSamples()); 2060 fDevManager->getGrRenderTarget()->numSamples());
2061 } 2061 }
2062 #endif 2062 #endif
2063 2063
2064 this->setTitle(title.c_str()); 2064 this->setTitle(title.c_str());
2065 } 2065 }
2066 2066
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 setenv("ANDROID_ROOT", "/android/device/data", 0); 2396 setenv("ANDROID_ROOT", "/android/device/data", 0);
2397 #endif 2397 #endif
2398 SkGraphics::Init(); 2398 SkGraphics::Init();
2399 SkEvent::Init(); 2399 SkEvent::Init();
2400 } 2400 }
2401 2401
2402 void application_term() { 2402 void application_term() {
2403 SkEvent::Term(); 2403 SkEvent::Term();
2404 SkGraphics::Term(); 2404 SkGraphics::Term();
2405 } 2405 }
OLDNEW
« no previous file with comments | « include/views/SkView.h ('k') | samplecode/SampleChart.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698