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

Side by Side Diff: tools/PictureRenderer.h

Issue 639793002: Revert of Make the Sk GL context class an abstract base class (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 | « tests/Test.cpp ('k') | tools/PictureRenderer.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 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 #ifndef PictureRenderer_DEFINED 8 #ifndef PictureRenderer_DEFINED
9 #define PictureRenderer_DEFINED 9 #define PictureRenderer_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 #if SK_SUPPORT_GPU 24 #if SK_SUPPORT_GPU
25 #include "GrContextFactory.h" 25 #include "GrContextFactory.h"
26 #include "GrContext.h" 26 #include "GrContext.h"
27 #endif 27 #endif
28 28
29 #include "image_expectations.h" 29 #include "image_expectations.h"
30 30
31 class SkBitmap; 31 class SkBitmap;
32 class SkCanvas; 32 class SkCanvas;
33 class SkGLContext; 33 class SkGLContextHelper;
34 class SkThread; 34 class SkThread;
35 35
36 namespace sk_tools { 36 namespace sk_tools {
37 37
38 class TiledPictureRenderer; 38 class TiledPictureRenderer;
39 39
40 class PictureRenderer : public SkRefCnt { 40 class PictureRenderer : public SkRefCnt {
41 41
42 public: 42 public:
43 enum SkDeviceTypes { 43 enum SkDeviceTypes {
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 #endif 362 #endif
363 #if SK_MESA 363 #if SK_MESA
364 case kMesa_DeviceType: 364 case kMesa_DeviceType:
365 #endif 365 #endif
366 return true; 366 return true;
367 default: 367 default:
368 return false; 368 return false;
369 } 369 }
370 } 370 }
371 371
372 SkGLContext* getGLContext() { 372 SkGLContextHelper* getGLContext() {
373 GrContextFactory::GLContextType glContextType 373 GrContextFactory::GLContextType glContextType
374 = GrContextFactory::kNull_GLContextType; 374 = GrContextFactory::kNull_GLContextType;
375 switch(fDeviceType) { 375 switch(fDeviceType) {
376 case kGPU_DeviceType: 376 case kGPU_DeviceType:
377 glContextType = GrContextFactory::kNative_GLContextType; 377 glContextType = GrContextFactory::kNative_GLContextType;
378 break; 378 break;
379 case kNVPR_DeviceType: 379 case kNVPR_DeviceType:
380 glContextType = GrContextFactory::kNVPR_GLContextType; 380 glContextType = GrContextFactory::kNVPR_GLContextType;
381 break; 381 break;
382 #if SK_ANGLE 382 #if SK_ANGLE
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 713
714 #if SK_SUPPORT_GPU 714 #if SK_SUPPORT_GPU
715 extern PictureRenderer* CreateGatherPixelRefsRenderer(const GrContext::Options& opts); 715 extern PictureRenderer* CreateGatherPixelRefsRenderer(const GrContext::Options& opts);
716 #else 716 #else
717 extern PictureRenderer* CreateGatherPixelRefsRenderer(); 717 extern PictureRenderer* CreateGatherPixelRefsRenderer();
718 #endif 718 #endif
719 719
720 } 720 }
721 721
722 #endif // PictureRenderer_DEFINED 722 #endif // PictureRenderer_DEFINED
OLDNEW
« no previous file with comments | « tests/Test.cpp ('k') | tools/PictureRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698