| OLD | NEW | 
|    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 "SkBitmapDevice.h" |    8 #include "SkBitmapDevice.h" | 
|    9 #include "SkCanvas.h" |    9 #include "SkCanvas.h" | 
|   10 #include "SkColorPriv.h" |   10 #include "SkColorPriv.h" | 
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  311                 GrContext* context = factory->get(type); |  311                 GrContext* context = factory->get(type); | 
|  312                 if (NULL == context) { |  312                 if (NULL == context) { | 
|  313                     continue; |  313                     continue; | 
|  314                 } |  314                 } | 
|  315                 GrSurfaceDesc desc; |  315                 GrSurfaceDesc desc; | 
|  316                 desc.fFlags = kRenderTarget_GrSurfaceFlag | kNoStencil_GrSurface
     Flag; |  316                 desc.fFlags = kRenderTarget_GrSurfaceFlag | kNoStencil_GrSurface
     Flag; | 
|  317                 desc.fWidth = DEV_W; |  317                 desc.fWidth = DEV_W; | 
|  318                 desc.fHeight = DEV_H; |  318                 desc.fHeight = DEV_H; | 
|  319                 desc.fConfig = kSkia8888_GrPixelConfig; |  319                 desc.fConfig = kSkia8888_GrPixelConfig; | 
|  320                 desc.fOrigin = 1 == dtype ? kBottomLeft_GrSurfaceOrigin : kTopLe
     ft_GrSurfaceOrigin; |  320                 desc.fOrigin = 1 == dtype ? kBottomLeft_GrSurfaceOrigin : kTopLe
     ft_GrSurfaceOrigin; | 
|  321                 SkAutoTUnref<GrTexture> texture( |  321                 SkAutoTUnref<GrTexture> texture(context->createTexture(desc, fal
     se)); | 
|  322                     context->refScratchTexture(desc, GrContext::kExact_ScratchTe
     xMatch)); |  | 
|  323                 surface.reset(SkSurface::NewRenderTargetDirect(texture->asRender
     Target())); |  322                 surface.reset(SkSurface::NewRenderTargetDirect(texture->asRender
     Target())); | 
|  324 #else |  323 #else | 
|  325                 continue; |  324                 continue; | 
|  326 #endif |  325 #endif | 
|  327             } |  326             } | 
|  328             SkCanvas& canvas = *surface->getCanvas(); |  327             SkCanvas& canvas = *surface->getCanvas(); | 
|  329             fillCanvas(&canvas); |  328             fillCanvas(&canvas); | 
|  330  |  329  | 
|  331             static const struct { |  330             static const struct { | 
|  332                 SkColorType fColorType; |  331                 SkColorType fColorType; | 
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  384                         checkRead(reporter, wkbmp, clippedRect.fLeft, |  383                         checkRead(reporter, wkbmp, clippedRect.fLeft, | 
|  385                                   clippedRect.fTop, true, false); |  384                                   clippedRect.fTop, true, false); | 
|  386                     } else { |  385                     } else { | 
|  387                         REPORTER_ASSERT(reporter, !success); |  386                         REPORTER_ASSERT(reporter, !success); | 
|  388                     } |  387                     } | 
|  389                 } |  388                 } | 
|  390             } |  389             } | 
|  391         } |  390         } | 
|  392     } |  391     } | 
|  393 } |  392 } | 
| OLD | NEW |