Home | History | Annotate | Download | only in core
      1 /*
      2  * Copyright 2018 Google Inc.
      3  *
      4  * Use of this source code is governed by a BSD-style license that can be
      5  * found in the LICENSE file.
      6  */
      7 
      8 #include "SkDeferredDisplayList.h"
      9 
     10 #include "SkCanvas.h"
     11 #include "SkSurface.h"
     12 
     13 #ifndef SK_RASTER_RECORDER_IMPLEMENTATION
     14 SkDeferredDisplayList::SkDeferredDisplayList(const SkSurfaceCharacterization& characterization,
     15                                              sk_sp<LazyProxyData> lazyProxyData)
     16         : fCharacterization(characterization)
     17         , fLazyProxyData(std::move(lazyProxyData)) {
     18 }
     19 #endif
     20 
     21 #ifdef SK_RASTER_RECORDER_IMPLEMENTATION
     22 // Placeholder. Ultimately, the SkSurface_Gpu will pass the wrapped opLists to its
     23 // renderTargetContext.
     24 bool SkDeferredDisplayList::draw(SkSurface* surface) const {
     25     surface->getCanvas()->drawImage(fImage.get(), 0, 0);
     26     return true;
     27 }
     28 #endif
     29